@Test public void testUpdateCounter() { final String testingValue = "testingValue"; when(innerFilter.set(testingValue)).thenReturn(false); assertThat(filterUpdateTimesCounter.sum()).isZero(); assertThat(wrapper.set(testingValue)).isFalse(); assertThat(filterUpdateTimesCounter.sum()).isEqualTo(1); }
@Override public boolean set(String value) { filterUpdateTimesCounter.increment(); return filter.set(value); }
CountUpdateBloomFilterWrapper implements BloomFilter { @Override public boolean set(String value) { filterUpdateTimesCounter.increment(); return filter.set(value); } }
CountUpdateBloomFilterWrapper implements BloomFilter { @Override public boolean set(String value) { filterUpdateTimesCounter.increment(); return filter.set(value); } CountUpdateBloomFilterWrapper(BloomFilter filter, LongAdder filterUpdateTimesCounter); }
CountUpdateBloomFilterWrapper implements BloomFilter { @Override public boolean set(String value) { filterUpdateTimesCounter.increment(); return filter.set(value); } CountUpdateBloomFilterWrapper(BloomFilter filter, LongAdder filterUpdateTimesCounter); @Override int expectedInsertions(); @Override double fpp(); @Override boolean mightContain(String value); @Override boolean set(String value); @Override boolean valid(); @Override void writeTo(OutputStream out); @Override boolean equals(Object o); @Override int hashCode(); }
CountUpdateBloomFilterWrapper implements BloomFilter { @Override public boolean set(String value) { filterUpdateTimesCounter.increment(); return filter.set(value); } CountUpdateBloomFilterWrapper(BloomFilter filter, LongAdder filterUpdateTimesCounter); @Override int expectedInsertions(); @Override double fpp(); @Override boolean mightContain(String value); @Override boolean set(String value); @Override boolean valid(); @Override void writeTo(OutputStream out); @Override boolean equals(Object o); @Override int hashCode();  }