### Question:
CommentResponse extends OCFOMASAPIResponse { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (objectToCompare == null || getClass() != objectToCompare.getClass()) { return false; } CommentResponse that = (CommentResponse) objectToCompare; return getReplyCount() == that.getReplyCount() && Objects.equals(getComment(), that.getComment()); } CommentResponse();  CommentResponse(CommentResponse template); Comment getComment(); void setComment(Comment comment); int getReplyCount(); void setReplyCount(int replyCount); @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())); CommentResponse sameObject = getTestObject(); assertTrue(sameObject.equals(sameObject)); CommentResponse differentObject = getTestObject(); differentObject.setReplyCount(8); assertFalse(getTestObject().equals(differentObject)); }