### Question:
InstanceHeader extends InstanceAuditHeader { @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; } InstanceHeader that = (InstanceHeader) objectToCompare; return Objects.equals(guid, that.guid) && Objects.equals(getInstanceURL(), that.getInstanceURL()); } InstanceHeader();  InstanceHeader(InstanceHeader    template); String getInstanceURL(); void setInstanceURL(String instanceURL); String getGUID(); void setGUID(String guid); @Override String toString(); @Override boolean equals(Object objectToCompare); @Override int hashCode();  }### Answer:
@Test public void testEquals() { assertTrue(getTestObject().equals(getTestObject())); InstanceHeader testObject = getTestObject(); assertTrue(testObject.equals(testObject)); assertFalse(getTestObject().equals(null)); assertFalse(getTestObject().equals("A String")); InstanceHeader differentObject = getTestObject(); differentObject.setCreatedBy("DifferentAuthor"); assertFalse(testObject.equals(differentObject)); differentObject = getTestObject(); differentObject.setMetadataCollectionId("DifferentHomeId"); assertFalse(testObject.equals(differentObject)); }