aherbert commented on code in PR #402:
URL: 
https://github.com/apache/commons-collections/pull/402#discussion_r1404661158


##########
src/test/java/org/apache/commons/collections4/bloomfilter/CountingPredicateTest.java:
##########
@@ -16,31 +16,103 @@
  */
 package org.apache.commons.collections4.bloomfilter;
 
+import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
+import java.util.ArrayList;
+import java.util.List;
+import java.util.function.BiPredicate;
+
+import org.apache.commons.lang3.tuple.Pair;
 import org.junit.jupiter.api.Test;
 
 public class CountingPredicateTest {
+    private List<Pair<Integer, Integer>> expected = new ArrayList<>();
+    private List<Pair<Integer, Integer>> result = new ArrayList<>();

Review Comment:
   This could be an argument to `makeFunc`. The `expected` can be created for 
each test that uses it.
   
   Currently using a class level object works as JUnit is only executing one 
test at a time on an instance. But it is cleaner and more thread safe to pass 
in `result` to the `makeFunc` helper (which can be static).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to