### Question:
ValidValueResponse extends OCFOMASAPIResponse { @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; } ValidValueResponse that = (ValidValueResponse) objectToCompare; return Objects.equals(getValidValue(), that.getValidValue()); } ValidValueResponse();  ValidValueResponse(ValidValueResponse template); ValidValue getValidValue(); void setValidValue(ValidValue validValue); @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())); ValidValueResponse sameObject = getTestObject(); assertTrue(sameObject.equals(sameObject)); ValidValueResponse differentObject = getTestObject(); differentObject.setRelatedHTTPCode(8); assertFalse(getTestObject().equals(differentObject)); }