### Question:
Endpoint extends Referenceable { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof Endpoint)) { return false; } if (!super.equals(objectToCompare)) { return false; } Endpoint endpoint = (Endpoint) objectToCompare; return Objects.equals(getDisplayName(), endpoint.getDisplayName()) && Objects.equals(getDescription(), endpoint.getDescription()) && Objects.equals(getAddress(), endpoint.getAddress()) && Objects.equals(getProtocol(), endpoint.getProtocol()) && Objects.equals(getEncryptionMethod(), endpoint.getEncryptionMethod()); } Endpoint();  Endpoint(Endpoint templateEndpoint); static ElementType getEndpointType(); void setDisplayName(String displayName); String getDisplayName(); void setDescription(String description); String getDescription(); void setAddress(String address); String getAddress(); void setProtocol(String protocol); String getProtocol(); void setEncryptionMethod(String encryptionMethod); String getEncryptionMethod(); @Override String toString(); @Override boolean equals(Object objectToCompare);  }### Answer:
@Test public void testEquals() { assertFalse(getTestObject().equals(null)); assertFalse(getTestObject().equals("DummyString")); assertTrue(getTestObject().equals(getTestObject())); Endpoint sameObject = getTestObject(); assertTrue(sameObject.equals(sameObject)); Endpoint differentObject = getTestObject(); differentObject.setGUID("Different"); assertFalse(getTestObject().equals(differentObject)); }