NumEntries { @Override public int hashCode() { return Objects.hashCode(size, isExact); } private  NumEntries(long size, boolean isExact); @Override int hashCode(); @Override boolean equals(Object obj);  }
@Test public void testHashCode() { assertEquals(NumEntries.ZERO.hashCode(), NumEntries.ZERO.hashCode()); NumEntries ne1True = NumEntries.valueOf(1, true); NumEntries ne1False = NumEntries.valueOf(1, false); assertEquals(ne1True.hashCode(), ne1True.hashCode()); assertNotEquals(ne1False.hashCode(), ne1True.hashCode()); }