### Question:
TermCodeSystemVersion implements Serializable { @Override public boolean equals(Object theO) { if (this == theO) { return true; } if (theO == null || getClass() != theO.getClass()) { return false; } TermCodeSystemVersion that = (TermCodeSystemVersion) theO; return new EqualsBuilder() .append(myCodeSystemVersionId, that.myCodeSystemVersionId) .append(myCodeSystemPid, that.myCodeSystemPid) .isEquals(); } TermCodeSystemVersion(); TermCodeSystem getCodeSystem(); TermCodeSystemVersion setCodeSystem(TermCodeSystem theCodeSystem); String getCodeSystemVersionId(); TermCodeSystemVersion setCodeSystemVersionId(String theCodeSystemVersionId); Collection<TermConcept> getConcepts(); Long getPid(); ResourceTable getResource(); TermCodeSystemVersion setResource(ResourceTable theResource); TermCodeSystemVersion setId(Long theId); @Override boolean equals(Object theO); @Override int hashCode(); String getCodeSystemDisplayName(); void setCodeSystemDisplayName(String theCodeSystemDisplayName); TermConcept addConcept(); @Override String toString(); static final String IDX_CODESYSTEM_AND_VER; static final int MAX_VERSION_LENGTH; }### Answer:
@Test public void testEquals() { TermCodeSystemVersion csv1 = new TermCodeSystemVersion().setCodeSystemVersionId("1").setCodeSystemPidForUnitTest(123L); TermCodeSystemVersion csv2 = new TermCodeSystemVersion().setCodeSystemVersionId("1").setCodeSystemPidForUnitTest(123L); TermCodeSystemVersion csv3 = new TermCodeSystemVersion().setCodeSystemVersionId("1").setCodeSystemPidForUnitTest(124L); assertEquals(csv1, csv2); assertNotEquals(csv1, csv3); assertNotEquals(csv1, null); assertNotEquals(csv1, ""); }