### Question:
EntitySummary extends InstanceHeader { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (objectToCompare == null || getClass() != objectToCompare.getClass()) { return false; } if (!super.equals(objectToCompare)) { return false; } EntitySummary that = (EntitySummary) objectToCompare; return Objects.equals(getClassifications(), that.getClassifications()); } EntitySummary();  EntitySummary(EntitySummary   templateElement); List<Classification> getClassifications(); void setClassifications(List<Classification> classifications); @Override String toString(); @Override boolean equals(Object objectToCompare); @Override int hashCode();  }### Answer:
@Test public void testEquals() { assertTrue(getTestObject().equals(getTestObject())); EntitySummary testObject = getTestObject(); assertTrue(testObject.equals(testObject)); assertFalse(getTestObject().equals(null)); assertFalse(getTestObject().equals("A String")); EntitySummary differentObject = getTestObject(); differentObject.setCreatedBy("DifferentAuthor"); assertFalse(testObject.equals(differentObject)); differentObject = getTestObject(); differentObject.setMetadataCollectionId("DifferentHomeId"); assertFalse(testObject.equals(differentObject)); differentObject = getTestObject(); differentObject.setClassifications(null); assertFalse(testObject.equals(differentObject)); }