From a251c18dae1d88491889e5cc36fe07bf58a87a03 Mon Sep 17 00:00:00 2001
From: Claude Warren Note that a BitCountProducer may return duplicate indices and may be unordered.
+ *
+ * Implementations must guarantee that:
+ *
+ * Note that implementations that do not output duplicate indices for BitCountProducer and
+ * do for IndexProducer, or vice versa, are consistent if the distinct indices from each are
+ * the same.
+ *
+ * For example the mapping [(1,2),(2,3),(3,1)] can be output with many combinations including:
+ * Must only process each index once, and must process indexes in order. Note that the BitCountProducer does not remove duplicates. Any use of the
+ * BitCountProducer to create an aggregate mapping of index to counts, such as a
+ * CountingBloomFilter, should use the same BitCountProducer in both add and
+ * subtract operations to maintain consistency.
+ * Note: This is a functional interface as a specialization of
@@ -71,7 +115,7 @@ public interface BitCountProducer extends IndexProducer {
@FunctionalInterface
interface BitCountConsumer {
/**
- * Performs this operation on the given {@code This is like the `indices(Shape)` method except that it adds the guarantee that no
- * duplicate values will be returned This method may return duplicates if the collection of unique values from each of the contained
+ * hashers contain duplicates. This is equivalent to creating Bloom filters for each contained hasher
+ * and returning an IndexProducer with the concatenated output indices from each filter. A BitCountProducer generated from this IndexProducer is equivalent to a BitCountProducer from a
+ * counting Bloom filter that was constructed from the contained hashers unique indices.
+ *
+ * @param shape the shape of the desired Bloom filter.
+ * @return the iterator of integers
+ */
@Override
public IndexProducer uniqueIndices(final Shape shape) {
Objects.requireNonNull(shape, "shape");
@@ -106,6 +120,27 @@ public class HasherCollection implements Hasher {
};
}
+ /**
+ * Creates an IndexProducer comprising the unique indices across all the contained
+ * hashers.
+ *
+ * This is equivalent to an IndexProducer created from a Bloom filter that comprises all
+ * the contained hashers. If the index is negative the behavior is not defined. This is conceptually a unique filter implemented as a {@code IntPredicate}. This is conceptually a unique filter implemented as an {@code IntPredicate}.
+ *
+ *
+ *
+ * [(1,2),(2,3),(3,1)]
+ * [(1,1),(1,1),(2,1),(2,1),(2,1),(3,1)]
+ * [(1,1),(3,1),(1,1),(2,1),(2,1),(2,1)]
+ * [(3,1),(1,1),(2,2),(1,1),(2,1)]
+ * ...
+ *
*
* @since 4.5
*/
@@ -32,14 +56,18 @@ public interface BitCountProducer extends IndexProducer {
* index-count pair, if the consumer returns {@code false} the execution is stopped, {@code false}
* is returned, and no further pairs are processed.
*
- *
+ * The default implementation of this method returns unique values in order. + *
* @return An int array of the data. */ default int[] asIndexArray() { diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/AbstractBitCountProducerTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/AbstractBitCountProducerTest.java index e51f90105..9499b301a 100644 --- a/src/test/java/org/apache/commons/collections4/bloomfilter/AbstractBitCountProducerTest.java +++ b/src/test/java/org/apache/commons/collections4/bloomfilter/AbstractBitCountProducerTest.java @@ -16,35 +16,41 @@ */ package org.apache.commons.collections4.bloomfilter; +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assumptions.assumeTrue; +import java.util.Arrays; +import java.util.BitSet; + +import org.apache.commons.collections4.bag.TreeBag; import org.apache.commons.collections4.bloomfilter.BitCountProducer.BitCountConsumer; +import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; public abstract class AbstractBitCountProducerTest extends AbstractIndexProducerTest { - /** - * A testing BitCountConsumer that always returns false. - */ - public static BitCountConsumer FALSE_CONSUMER = new BitCountConsumer() { - - @Override - public boolean test(int index, int count) { - return false; - } - }; - /** * A testing BitCountConsumer that always returns true. */ - public static BitCountConsumer TRUE_CONSUMER = new BitCountConsumer() { + private static final BitCountConsumer TRUE_CONSUMER = (i, j) -> true; + /** + * A testing BitCountConsumer that always returns false. + */ + private static final BitCountConsumer FALSE_CONSUMER = (i, j) -> false; - @Override - public boolean test(int index, int count) { - return true; - } - }; + /** + * Creates an array of integer pairs comprising the index and the expected count for the index. + * The order and count for each index is dependent upon the producer created by the {@code createProducer()} + * method. + * By default returns the each {@code getExpectedIndices()} value paired with 1 (one). + * @return an array of integer pairs comprising the index and the expected count for the index. + */ + protected int[][] getExpectedBitCount() { + return Arrays.stream(getExpectedIndices()).mapToObj(x -> new int[] {x, 1}).toArray(int[][]::new); + } /** * Creates a producer with some data. @@ -54,29 +60,109 @@ public abstract class AbstractBitCountProducerTest extends AbstractIndexProducer protected abstract BitCountProducer createProducer(); /** - * Creates an producer without data. + * Creates a producer without data. * @return a producer that has no data. */ @Override protected abstract BitCountProducer createEmptyProducer(); /** - * Determines if empty tests should be run. Some producers do not implement an empty - * version. Tests for those classes should return false. - * @return true if the empty tests are supported + * Gets the behaviour of the {@link BitCountProducer#forEachCount(BitCountConsumer)} method. + * By default returns the value of {@code getAsIndexArrayBehaviour()} method. + * @return the behaviour. */ - protected boolean supportsEmpty() { - return true; + protected int getForEachCountBehaviour() { + return getAsIndexArrayBehaviour(); } @Test - public final void testForEachCount() { + public final void testForEachCountPredicates() { + BitCountProducer populated = createProducer(); + BitCountProducer empty = createEmptyProducer(); - assertFalse(createProducer().forEachCount(FALSE_CONSUMER), "non-empty should be false"); - assertTrue(createProducer().forEachCount(TRUE_CONSUMER), "non-empty should be true"); - if (supportsEmpty()) { - assertTrue(createEmptyProducer().forEachCount(FALSE_CONSUMER), "empty should be true"); - assertTrue(createEmptyProducer().forEachCount(TRUE_CONSUMER), "empty should be true"); + assertFalse(populated.forEachCount(FALSE_CONSUMER), "non-empty should be false"); + assertTrue(empty.forEachCount(FALSE_CONSUMER), "empty should be true"); + + assertTrue(populated.forEachCount(TRUE_CONSUMER), "non-empty should be true"); + assertTrue(empty.forEachCount(TRUE_CONSUMER), "empty should be true"); + } + + @Test + public final void testEmptyBitCountProducer() { + BitCountProducer empty = createEmptyProducer(); + int ary[] = empty.asIndexArray(); + assertEquals(0, ary.length); + assertTrue(empty.forEachCount((i, j) -> { + Assertions.fail("forEachCount consumer should not be called"); + return false; + })); + } + + @Test + public final void testIndexConsistency() { + BitCountProducer producer = createProducer(); + BitSet bs1 = new BitSet(); + BitSet bs2 = new BitSet(); + producer.forEachIndex(i -> { + bs1.set(i); + return true; + }); + producer.forEachCount((i, j) -> { + bs2.set(i); + return true; + }); + Assertions.assertEquals(bs1, bs2); + } + + @Test + public void testForEachCountValues() { + // Assumes the collections bag works. Could be replaced with MapThe flags indicate if the methods {@link IndexProducer#forEachIndex(IntPredicate)}
- * and {@link IndexProducer#asIndexArray()} output sorted or distinct indices.
- *
+ * Gets the behaviour of the {@link IndexProducer#asIndexArray()} method.
* @return the behaviour.
*/
- protected abstract int getBehaviour();
+ protected abstract int getAsIndexArrayBehaviour();
+ /**
+ * Gets the behaviour of the {@link IndexProducer#forEachIndex(IntPredicate)} method.
+ * By default returns the value of {@code getAsIndexArrayBehaviour()} method.
+ * @return the behaviour.
+ */
+ protected int getForEachIndexBehaviour() {
+ return getAsIndexArrayBehaviour();
+ }
+
+ /**
+ * Creates an array of expected indices.
+ * The expected indices are dependent upon the producer created in the {@code createProducer()} method.
+ * @return an array of expected indices.
+ */
+ protected abstract int[] getExpectedIndices();
+
+ /**
+ * Test to ensure that all expected values are generated at least once.
+ */
+ @Test
+ public final void testAsIndexArrayValues() {
+ BitSet bs = new BitSet();
+ Arrays.stream(createProducer().asIndexArray()).forEach(bs::set);
+ for (int i : getExpectedIndices()) {
+ assertTrue(bs.get(i), () -> "Missing " + i);
+ }
+ }
+
+ /**
+ * Test to ensure that for each index returns each expected index at least once.
+ */
@Test
public final void testForEachIndex() {
+ BitSet bs1 = new BitSet();
+ BitSet bs2 = new BitSet();
+ Arrays.stream(getExpectedIndices()).forEach(bs1::set);
+ createProducer().forEachIndex(i -> {
+ bs2.set(i);
+ return true;
+ });
+ Assertions.assertEquals(bs1, bs2);
+ }
+
+ @Test
+ public final void testForEachIndexPredicates() {
IndexProducer populated = createProducer();
IndexProducer empty = createEmptyProducer();
@@ -131,35 +168,58 @@ public abstract class AbstractIndexProducerTest {
Assertions.assertEquals(bs1, bs2);
}
+ /**
+ * Tests the behaviour of {@code IndexProducer.asIndexArray()}.
+ * The expected behaviour is defined by the {@code getBehaviour()} method.
+ * The index array may be Ordered, Distinct or both.
+ * If the index array is not distinct then all elements returned by the {@code getExpectedIndices()}
+ * method, including duplicates, are expected to be returned by the {@code asIndexArray()} method.
+ */
@Test
public final void testBehaviourAsIndexArray() {
- int flags = getBehaviour();
- Assumptions.assumeTrue((flags & (AS_ARRAY_ORDERED | AS_ARRAY_DISTINCT)) != 0);
+ int flags = getAsIndexArrayBehaviour();
int[] actual = createProducer().asIndexArray();
- if ((flags & AS_ARRAY_ORDERED) != 0) {
+ if ((flags & ORDERED) != 0) {
int[] expected = Arrays.stream(actual).sorted().toArray();
Assertions.assertArrayEquals(expected, actual);
}
- if ((flags & AS_ARRAY_DISTINCT) != 0) {
+ if ((flags & DISTINCT) != 0) {
long count = Arrays.stream(actual).distinct().count();
Assertions.assertEquals(count, actual.length);
+ } else {
+ // if the array is not distinct all expected elements must be generated
+ // This is modified so use a copy
+ int[] expected = getExpectedIndices().clone();
+ Arrays.sort(expected);
+ Arrays.sort(actual);
+ Assertions.assertArrayEquals(expected, actual);
}
}
+ /**
+ * Tests the behaviour of {@code IndexProducer.forEachIndex()}.
+ * The expected behaviour is defined by the {@code getBehaviour()} method.
+ * The order is assumed to follow the order produced by {@code IndexProducer.asIndexArray()}.
+ */
@Test
- public final void testBehaviourForEach() {
- int flags = getBehaviour();
- Assumptions.assumeTrue((flags & (FOR_EACH_ORDERED | FOR_EACH_DISTINCT)) != 0);
+ public final void testBehaviourForEachIndex() {
+ int flags = getForEachIndexBehaviour();
IntList list = new IntList();
createProducer().forEachIndex(list::add);
int[] actual = list.toArray();
- if ((flags & FOR_EACH_ORDERED) != 0) {
+ if ((flags & ORDERED) != 0) {
int[] expected = Arrays.stream(actual).sorted().toArray();
Assertions.assertArrayEquals(expected, actual);
}
- if ((flags & FOR_EACH_DISTINCT) != 0) {
+ if ((flags & DISTINCT) != 0) {
long count = Arrays.stream(actual).distinct().count();
Assertions.assertEquals(count, actual.length);
+ } else {
+ // if forEach is not distinct all expected elements must be generated
+ int[] expected = getExpectedIndices().clone();
+ Arrays.sort(expected);
+ Arrays.sort(actual);
+ Assertions.assertArrayEquals(expected, actual);
}
}
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/BitCountProducerFromAbsoluteUniqueHasherCollectionTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/BitCountProducerFromAbsoluteUniqueHasherCollectionTest.java
new file mode 100644
index 000000000..a61c80aef
--- /dev/null
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/BitCountProducerFromAbsoluteUniqueHasherCollectionTest.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.collections4.bloomfilter;
+
+
+public class BitCountProducerFromAbsoluteUniqueHasherCollectionTest extends AbstractBitCountProducerTest {
+
+ @Override
+ protected BitCountProducer createProducer() {
+ // hasher has collisions and wraps
+ return BitCountProducer.from(new HasherCollection(
+ new IncrementingHasher(1, 1),
+ new IncrementingHasher(7, 2)).absoluteUniqueIndices(Shape.fromKM(5, 10)));
+ }
+
+ @Override
+ protected BitCountProducer createEmptyProducer() {
+ return BitCountProducer.from(new HasherCollection().absoluteUniqueIndices(Shape.fromKM(11, 10)));
+ }
+
+ @Override
+ protected int getAsIndexArrayBehaviour() {
+ return DISTINCT;
+ }
+
+ @Override
+ protected int[] getExpectedIndices() {
+ return new int[]{1, 2, 3, 4, 5, 7, 9};
+ }
+}
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/BitCountProducerFromArrayCountingBloomFilterTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/BitCountProducerFromArrayCountingBloomFilterTest.java
index 331411436..340e8146c 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/BitCountProducerFromArrayCountingBloomFilterTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/BitCountProducerFromArrayCountingBloomFilterTest.java
@@ -23,8 +23,8 @@ public class BitCountProducerFromArrayCountingBloomFilterTest extends AbstractBi
@Override
protected BitCountProducer createProducer() {
ArrayCountingBloomFilter filter = new ArrayCountingBloomFilter(shape);
- Hasher hasher = new IncrementingHasher(0, 1);
- filter.merge(hasher);
+ filter.merge(new IncrementingHasher(0, 1));
+ filter.merge(new IncrementingHasher(5, 1));
return filter;
}
@@ -34,8 +34,20 @@ public class BitCountProducerFromArrayCountingBloomFilterTest extends AbstractBi
}
@Override
- protected int getBehaviour() {
+ protected int getAsIndexArrayBehaviour() {
// CountingBloomFilter based on an array will be distinct and ordered
- return FOR_EACH_DISTINCT | FOR_EACH_ORDERED | AS_ARRAY_DISTINCT | AS_ARRAY_ORDERED;
+ return DISTINCT | ORDERED;
+ }
+
+ @Override
+ protected int[][] getExpectedBitCount() {
+ return new int[][]{{0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 2}, {6, 2}, {7, 2},
+ {8, 2}, {9, 2}, {10, 2}, {11, 2}, {12, 2}, {13, 2}, {14, 2}, {15, 2}, {16, 2},
+ {17, 1}, {18, 1}, {19, 1}, {20, 1}, {21, 1}};
+ }
+
+ @Override
+ protected int[] getExpectedIndices() {
+ return new int[]{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21};
}
}
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/IndexProducerFromHasherTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/BitCountProducerFromDefaultIndexProducerTest.java
similarity index 63%
rename from src/test/java/org/apache/commons/collections4/bloomfilter/IndexProducerFromHasherTest.java
rename to src/test/java/org/apache/commons/collections4/bloomfilter/BitCountProducerFromDefaultIndexProducerTest.java
index 0e7368dee..56a5c792a 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/IndexProducerFromHasherTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/BitCountProducerFromDefaultIndexProducerTest.java
@@ -16,21 +16,27 @@
*/
package org.apache.commons.collections4.bloomfilter;
-public class IndexProducerFromHasherTest extends AbstractIndexProducerTest {
+public class BitCountProducerFromDefaultIndexProducerTest extends AbstractBitCountProducerTest {
+
+ int[] data = {0, 63, 1, 1, 64, 127, 128};
@Override
- protected IndexProducer createProducer() {
- return new IncrementingHasher(0, 1).indices(Shape.fromKM(17, 72));
+ protected BitCountProducer createProducer() {
+ return BitCountProducer.from(IndexProducer.fromIndexArray(data));
}
@Override
- protected IndexProducer createEmptyProducer() {
- return NullHasher.INSTANCE.indices(Shape.fromKM(17, 72));
+ protected BitCountProducer createEmptyProducer() {
+ return BitCountProducer.from(IndexProducer.fromIndexArray(new int[0]));
}
@Override
- protected int getBehaviour() {
- // Hasher allows duplicates and may be unordered
+ protected int getAsIndexArrayBehaviour() {
return 0;
}
+
+ @Override
+ protected int[] getExpectedIndices() {
+ return data;
+ }
}
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/BitCountProducerFromHasherCollectionTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/BitCountProducerFromHasherCollectionTest.java
new file mode 100644
index 000000000..a8c84492c
--- /dev/null
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/BitCountProducerFromHasherCollectionTest.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.collections4.bloomfilter;
+
+public class BitCountProducerFromHasherCollectionTest extends AbstractBitCountProducerTest {
+
+ @Override
+ protected BitCountProducer createProducer() {
+ // hasher has collisions and wraps
+ return BitCountProducer.from(new HasherCollection(
+ new IncrementingHasher(0, 1),
+ new IncrementingHasher(2, 7)).indices(Shape.fromKM(17, 72)));
+ }
+
+ @Override
+ protected BitCountProducer createEmptyProducer() {
+ return BitCountProducer.from(NullHasher.INSTANCE.indices(Shape.fromKM(17, 72)));
+ }
+
+ @Override
+ protected int getAsIndexArrayBehaviour() {
+ return 0;
+ }
+
+ @Override
+ protected int[] getExpectedIndices() {
+ return new int[]{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
+ 2, 9, 16, 23, 30, 37, 44, 51, 58, 65, 0, 7, 14, 21, 28, 35, 42};
+ }
+
+ @Override
+ protected int[][] getExpectedBitCount() {
+ return new int[][]{{0, 2}, {1, 1}, {2, 2}, {3, 1}, {4, 1}, {5, 1}, {6, 1}, {7, 2}, {8, 1},
+ {9, 2}, {10, 1}, {11, 1}, {12, 1}, {13, 1}, {14, 2}, {15, 1}, {16, 2}, {21, 1}, {23, 1},
+ {28, 1}, {30, 1}, {35, 1}, {37, 1}, {42, 1}, {44, 1}, {51, 1}, {58, 1}, {65, 1} };
+ }
+}
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/UniqueIndexProducerFromHasherCollectionTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/BitCountProducerFromHasherTest.java
similarity index 52%
rename from src/test/java/org/apache/commons/collections4/bloomfilter/UniqueIndexProducerFromHasherCollectionTest.java
rename to src/test/java/org/apache/commons/collections4/bloomfilter/BitCountProducerFromHasherTest.java
index 54eeec90d..6c382ea25 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/UniqueIndexProducerFromHasherCollectionTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/BitCountProducerFromHasherTest.java
@@ -16,24 +16,32 @@
*/
package org.apache.commons.collections4.bloomfilter;
-public class UniqueIndexProducerFromHasherCollectionTest extends AbstractIndexProducerTest {
+public class BitCountProducerFromHasherTest extends AbstractBitCountProducerTest {
@Override
- protected IndexProducer createProducer() {
- return new HasherCollection(new IncrementingHasher(0, 1), new IncrementingHasher(0, 2)).uniqueIndices(Shape.fromKM(17, 72));
+ protected BitCountProducer createProducer() {
+ // hasher has collisions and wraps
+ return BitCountProducer.from(new IncrementingHasher(4, 8).indices(Shape.fromKM(17, 72)));
}
@Override
- protected IndexProducer createEmptyProducer() {
- return new HasherCollection().uniqueIndices(Shape.fromKM(17, 72));
+ protected BitCountProducer createEmptyProducer() {
+ return BitCountProducer.from(NullHasher.INSTANCE.indices(Shape.fromKM(17, 72)));
}
@Override
- protected int getBehaviour() {
- // Note:
- // Do not return FOR_EACH_DISTINCT | AS_ARRAY_DISTINCT.
- // Despite this being a unique index test, the HasherCollection will return a unique
- // index from each hasher. The result is there may still be duplicates.
+ protected int getAsIndexArrayBehaviour() {
+ // Hasher allows duplicates and may be unordered
return 0;
}
+
+ @Override
+ protected int[] getExpectedIndices() {
+ return new int[]{4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 12, 20, 28, 36, 44, 52, 60};
+ }
+
+ @Override
+ protected int[][] getExpectedBitCount() {
+ return new int[][]{{4, 2}, {12, 2}, {20, 2}, {28, 2}, {36, 2}, {44, 2}, {52, 2}, {60, 2}, {68, 1}};
+ }
}
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/BitCountProducerFromIndexProducerTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/BitCountProducerFromIndexProducerTest.java
deleted file mode 100644
index 8458dddfa..000000000
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/BitCountProducerFromIndexProducerTest.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.collections4.bloomfilter;
-
-import static org.junit.Assert.assertEquals;
-
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Disabled;
-import org.junit.jupiter.api.Test;
-
-public class BitCountProducerFromIndexProducerTest extends AbstractBitCountProducerTest {
-
- @Override
- protected BitCountProducer createProducer() {
- return BitCountProducer.from(IndexProducer.fromIndexArray(new int[] { 0, 63, 1, 1, 64, 127, 128 }));
- }
-
- @Override
- protected BitCountProducer createEmptyProducer() {
- return BitCountProducer.from(IndexProducer.fromIndexArray(new int[0]));
- }
-
- @Override
- protected int getBehaviour() {
- // The default method streams a BitSet so is distinct and ordered.
- return AS_ARRAY_DISTINCT | AS_ARRAY_ORDERED;
- }
-
- @Test
- @Disabled("Current behaviour will return the same index twice, each with a count of 1")
- public final void testFromIndexProducer() {
-
- BitCountProducer producer = createProducer();
- Map