### Question:
Connection extends Referenceable { @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; } Connection that = (Connection) objectToCompare; return Objects.equals(getDisplayName(), that.getDisplayName()) && Objects.equals(getDescription(), that.getDescription()) && Objects.equals(getConnectorType(), that.getConnectorType()) && Objects.equals(getEndpoint(), that.getEndpoint()) && Objects.equals(getUserId(), that.getUserId()) && Objects.equals(getEncryptedPassword(), that.getEncryptedPassword()) && Objects.equals(getClearPassword(), that.getClearPassword()) && Objects.equals(getConfigurationProperties(), that.getConfigurationProperties()) && Objects.equals(getSecuredProperties(), that.getSecuredProperties()); } Connection();  Connection(Connection template); static ElementType getConnectionType(); String getDisplayName(); void setDisplayName(String displayName); void setDescription(String description); String getDescription(); void setConnectorType(ConnectorType connectorType); ConnectorType getConnectorType(); String getUserId(); void setUserId(String userId); String getEncryptedPassword(); void setEncryptedPassword(String encryptedPassword); String getClearPassword(); void setClearPassword(String clearPassword); void setEndpoint(Endpoint endpoint); Endpoint getEndpoint(); void setConfigurationProperties(Map<String,Object> configurationProperties); Map<String,Object> getConfigurationProperties(); void setSecuredProperties(Map<String,Object> securedProperties); Map<String,Object> getSecuredProperties(); @Override String toString(); @Override boolean equals(Object objectToCompare); @Override int hashCode();  }### Answer:
@Test public void testEquals() { assertFalse(getTestObject().equals(null)); assertFalse(getTestObject().equals("DummyString")); assertTrue(getTestObject().equals(getTestObject())); Connection sameObject = getTestObject(); assertTrue(sameObject.equals(sameObject)); Connection differentObject = getTestObject(); differentObject.setGUID("Different"); assertFalse(getTestObject().equals(differentObject)); }