public void compareBitSets()
{
BloomFilter bf2 = (BloomFilter) FilterFactory.getFilter(FilterTestHelper.ELEMENTS / 2, FilterTestHelper.MAX_FAILURE_RATE, false);
BloomFilter bf3 = (BloomFilter) FilterFactory.getFilter(FilterTestHelper.ELEMENTS / 2, FilterTestHelper.MAX_FAILURE_RATE, true);
RandomStringGenerator gen1 = new KeyGenerator.RandomStringGenerator(new Random().nextInt(), FilterTestHelper.ELEMENTS);
// make sure both bitsets are empty.
compare(bf2.bitset, bf3.bitset);
while (gen1.hasNext())
{
ByteBuffer key = gen1.next();
bf2.add(key);
bf3.add(key);
}
compare(bf2.bitset, bf3.bitset);