GreekResultCollection implements Iterable<Pair<Greek, Double>> { @Override public int hashCode() { final int prime = 31; int result = 1; for (final Map.Entry<Greek, Double> entry : _backingMap.entrySet()) { result = prime * result + entry.getKey().hashCode(); result = prime * result + entry.getValue().hashCode(); } return result; }  Double get(final Greek greek); void put(final Greek greek, final Double result); boolean isEmpty(); boolean contains(final Greek greek); int size(); Set<Greek> keySet(); Collection<Double> values(); @Override String toString(); @Override int hashCode(); @Override boolean equals(final Object obj); @Override Iterator<Pair<Greek, Double>> iterator();  }
@Test public void testHashCode() { final GreekResultCollection grc1 = new GreekResultCollection(); final GreekResultCollection grc2 = new GreekResultCollection(); assertTrue(grc1.hashCode() == grc2.hashCode()); grc1.put(Greek.DELTA, 1.); assertFalse(grc1.hashCode() == grc2.hashCode()); grc2.put(Greek.DELTA, 1.); assertTrue(grc1.hashCode() == grc2.hashCode()); grc1.put(Greek.GAMMA, 1.); grc1.put(Greek.GAMMA, 2.); assertFalse(grc1.hashCode() == grc2.hashCode()); }