### Question:
MaxValueCountItem extends ProtectedItem { @Override public int hashCode() { int hash = 37; if ( items != null ) { for ( MaxValueCountElem item : items ) { if ( item != null ) { hash = hash * 17 + item.hashCode(); } else { hash = hash * 17 + 37; } } } return hash; } MaxValueCountItem( Set<MaxValueCountElem> items ); Iterator<MaxValueCountElem> iterator(); @Override int hashCode(); @Override boolean equals( Object o ); @Override String toString();  }### Answer:
@Test public void testHashCodeReflexive() throws Exception { assertEquals( maxValueCountItemA.hashCode(), maxValueCountItemA.hashCode() ); }
@Test public void testHashCodeSymmetric() throws Exception { assertEquals( maxValueCountItemA.hashCode(), maxValueCountItemACopy.hashCode() ); assertEquals( maxValueCountItemACopy.hashCode(), maxValueCountItemA.hashCode() ); }
@Test public void testHashCodeTransitive() throws Exception { assertEquals( maxValueCountItemA.hashCode(), maxValueCountItemACopy.hashCode() ); assertEquals( maxValueCountItemACopy.hashCode(), maxValueCountItemB.hashCode() ); assertEquals( maxValueCountItemA.hashCode(), maxValueCountItemB.hashCode() ); }