Claudenw commented on code in PR #258:
URL: 
https://github.com/apache/commons-collections/pull/258#discussion_r897668912


##########
src/test/java/org/apache/commons/collections4/bloomfilter/IndexFilterTest.java:
##########
@@ -16,91 +16,113 @@
  */
 package org.apache.commons.collections4.bloomfilter;
 
-import 
org.apache.commons.collections4.bloomfilter.hasher.HashFunctionIdentityImpl;
-import org.apache.commons.collections4.bloomfilter.hasher.Shape;
-import 
org.apache.commons.collections4.bloomfilter.hasher.HashFunctionIdentity.ProcessType;
-import 
org.apache.commons.collections4.bloomfilter.hasher.HashFunctionIdentity.Signedness;
-import org.junit.jupiter.api.Test;
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
+import java.lang.reflect.Field;
 import java.util.ArrayList;
-import java.util.Arrays;
+import java.util.BitSet;
+import java.util.HashSet;
+import java.util.List;
 import java.util.Set;
-import java.util.function.IntConsumer;
-import java.util.stream.Collectors;
+import java.util.SplittableRandom;
+import java.util.concurrent.ThreadLocalRandom;
 
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-import static org.junit.jupiter.api.Assertions.fail;
+import org.apache.commons.collections4.bloomfilter.Hasher.IndexFilter;
+import 
org.apache.commons.collections4.bloomfilter.Hasher.IndexFilter.ArrayTracker;
+import 
org.apache.commons.collections4.bloomfilter.Hasher.IndexFilter.BitMapTracker;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.CsvSource;
 
 /**
- * Tests for the {@link IndexFilters}.
+ * Tests the Filter class.
  */
 public class IndexFilterTest {
 
-    /**
-     * The shape of the dummy Bloom filter.
-     * This is used as an argument to a Hasher that just returns fixed indexes
-     * so the parameters do not matter.
-     */
-    private final Shape shape = new Shape(new HashFunctionIdentityImpl(
-        "Apache Commons Collections", "Dummy", Signedness.SIGNED, 
ProcessType.CYCLIC, 0L),
-        50, 3000, 4);
-
     @Test
-    public void testApplyThrowsWithNullArguments() {
-        final FixedIndexesTestHasher hasher = new 
FixedIndexesTestHasher(shape, 1, 2, 3);
-        final Shape shape = this.shape;
-        final ArrayList<Integer> actual = new ArrayList<>();
-        final IntConsumer consumer = actual::add;
-
-        try {
-            IndexFilters.distinctIndexes(null, shape, consumer);
-            fail("null hasher");
-        } catch (final NullPointerException expected) {
-            // Ignore
-        }
+    public void testFiltering() {

Review Comment:
   done



-- 
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