BloomFilterManagerImpl implements BloomFilterManager<T, C>,
        Listenable<BloomFilterManagerListener<? super T, C>> { @Override public int size() { return filterMap.size(); } BloomFilterManagerImpl(BloomFilterFactory<? extends T, ? super C> factory); @Override CreateFilterResult<T> createFilter(String name, C config, boolean overwrite); @Override void addFilters(Iterable<FilterRecord<? extends T>> filters); @Nullable @Override T getFilter(String name); @Override T ensureGetValidFilter(String name); @Override List<String> getAllFilterNames(); @Override int size(); @Override void remove(String name); @Override void remove(String name, T filter); @Override Iterator<FilterRecord<T>> iterator(); @Override void addListener(BloomFilterManagerListener<? super T, C> listener); @Override boolean removeListener(BloomFilterManagerListener<? super T, C> listener);  }
@Test public void testZeroSizeManager() { assertThat(manager.size()).isZero(); }
@Test public void testSize() { final int expectSize = ThreadLocalRandom.current().nextInt(1, 100); final ExpirableBloomFilterConfig config = new ExpirableBloomFilterConfig(); for (int i = 0; i < expectSize; i++) { manager.createFilter(numberString(i), config); } assertThat(manager.size()).isEqualTo(expectSize); }