### Question:
TypeDefSummary extends TypeDefLink { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof TypeDefSummary)) { return false; } if (!super.equals(objectToCompare)) { return false; } TypeDefSummary that = (TypeDefSummary) objectToCompare; return getVersion() == that.getVersion() && Objects.equals(getVersionName(), that.getVersionName()) && getCategory() == that.getCategory(); } TypeDefSummary();   TypeDefSummary(TypeDefCategory category,
                   String          guid,
                   String          name,
                   long            version,
                   String          versionName);  TypeDefSummary(TypeDefSummary template); TypeDefCategory getCategory(); void setCategory(TypeDefCategory category); long getVersion(); void setVersion(long version); String getVersionName(); void setVersionName(String versionName); @Override String toString(); @Override boolean equals(Object objectToCompare);  }### Answer:
@Test public void testEquals() { assertTrue(getTestObject().equals(getTestObject())); TypeDefSummary testObject = getTestObject(); assertTrue(testObject.equals(testObject)); assertFalse(getTestObject().equals(null)); assertFalse(getTestObject().equals("A String")); TypeDefSummary differentObject = new TypeDefSummary(TypeDefCategory.CLASSIFICATION_DEF, guid, name, 0 , "1.0"); assertFalse(testObject.equals(differentObject)); differentObject = getTestObject(); differentObject.setVersionName("DifferentHomeId"); assertFalse(testObject.equals(differentObject)); }