AbstractBloomFilterConfig implements BloomFilterConfig<T>, Cloneable { @Override public int hashCode() { int ret = Integer.hashCode(expectedInsertions); ret = 31 * ret + Double.hashCode(fpp); return ret; } AbstractBloomFilterConfig();   AbstractBloomFilterConfig(int expectedInsertions, double fpp); int expectedInsertions(); double fpp(); @SuppressWarnings("unchecked") @Override T setExpectedInsertions(int expectedInsertions); @SuppressWarnings("unchecked") @Override T setFpp(double fpp); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }
@Test public void testHashCode() { final double fpp = ThreadLocalRandom.current().nextDouble(0.0001, 1); final int expectedInsertions = ThreadLocalRandom.current().nextInt(1, Integer.MAX_VALUE); final TestingBloomFilterConfig filterA = new TestingBloomFilterConfig() .setFpp(fpp) .setExpectedInsertions(expectedInsertions); final TestingBloomFilterConfig filterB = new TestingBloomFilterConfig() .setFpp(fpp) .setExpectedInsertions(expectedInsertions); assertThat(filterA.hashCode()).isEqualTo(filterB.hashCode()); }