### Question:
AttributeValueItem extends ProtectedItem { @Override public int hashCode() { int hash = 37; if ( attributes != null ) { for ( Attribute attribute : attributes ) { hash = hash * 17 + attribute.hashCode(); } } return hash; } AttributeValueItem( Set<Attribute> attributes ); Iterator<Attribute> iterator(); @Override int hashCode(); @Override boolean equals( Object o ); @Override String toString();  }### Answer:
@Test public void testHashCodeReflexive() throws Exception { assertEquals( attributeValueItemA.hashCode(), attributeValueItemA.hashCode() ); }
@Test public void testHashCodeSymmetric() throws Exception { assertEquals( attributeValueItemA.hashCode(), attributeValueItemACopy.hashCode() ); assertEquals( attributeValueItemACopy.hashCode(), attributeValueItemA.hashCode() ); }
@Test public void testHashCodeTransitive() throws Exception { assertEquals( attributeValueItemA.hashCode(), attributeValueItemACopy.hashCode() ); assertEquals( attributeValueItemACopy.hashCode(), attributeValueItemB.hashCode() ); assertEquals( attributeValueItemA.hashCode(), attributeValueItemB.hashCode() ); }