### Question:
ValidValue 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; } ValidValue that = (ValidValue) objectToCompare; return Objects.equals(displayName, that.displayName) && Objects.equals(description, that.description) && Objects.equals(usage, that.usage) && Objects.equals(scope, that.scope) && Objects.equals(isDeprecated, that.isDeprecated) && Objects.equals(preferredValue, that.preferredValue); } ValidValue();  ValidValue(ValidValue template); String getDisplayName(); void setDisplayName(String displayName); String getDescription(); void setDescription(String description); String getUsage(); void setUsage(String usage); String getScope(); void setScope(String scope); String getPreferredValue(); void setPreferredValue(String preferredValue); boolean isDeprecated(); void setDeprecated(boolean deprecated); @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())); ValidValue sameObject = getTestObject(); assertTrue(sameObject.equals(sameObject)); ValidValue differentObject = getTestObject(); differentObject.setDisplayName("Different"); assertFalse(getTestObject().equals(differentObject)); differentObject = getTestObject(); differentObject.setGUID("Different"); assertFalse(getTestObject().equals(differentObject)); }