### Question:
TagDefinition implements Serializable { @Override public int hashCode() { if (myHashCode == null) { HashCodeBuilder b = new HashCodeBuilder(); b.append(myTagType); b.append(mySystem); b.append(myCode); myHashCode = b.toHashCode(); } return myHashCode; } TagDefinition();  TagDefinition(TagTypeEnum theTagType, String theSystem, String theCode, String theDisplay); String getCode(); String getDisplay(); Long getId(); String getSystem(); TagTypeEnum getTagType(); void setCode(String theCode); void setDisplay(String theDisplay); void setSystem(String theSystem); void setTagType(TagTypeEnum theTagType); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void testHashCode() { TagDefinition def = new TagDefinition(); def.setCode("my_code"); def.setSystem("my_system"); def.setDisplay("my_display"); assertEquals (-2125810377,def.hashCode()); assertEquals (-2125810377,def.hashCode()); }