### Question:
BloomFilter implements Predicate<T>, Serializable { public int getNumHashFunctions() { return numHashFunctions; } BloomFilter(double fpProb, int numElements);  BloomFilter(int numElements, int vectorSize); double getFalsePositiveProbability(); int getNumHashFunctions(); int getVectorSize(); int getNumAddedItems(); @Override boolean test(T item); void add(T item); void addAll(Collection<? extends T> items); @Override String toString();  }### Answer:
@Test public void testNumHashFunctions() { BloomFilter<String> filter = new BloomFilter<String>(10, 20); assertEquals(2, filter.getNumHashFunctions(), 0.01); filter = new BloomFilter<String>(10, 80); assertEquals(6, filter.getNumHashFunctions(), 0.01); filter = new BloomFilter<String>(10, 150); assertEquals(11, filter.getNumHashFunctions(), 0.01); }