### Question:
CommentRequestBody extends FeedbackRequestBody { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (objectToCompare == null || getClass() != objectToCompare.getClass()) { return false; } CommentRequestBody that = (CommentRequestBody) objectToCompare; return isPublic() == that.isPublic() && getCommentType() == that.getCommentType() && Objects.equals(getCommentText(), that.getCommentText()); } CommentRequestBody();  CommentRequestBody(CommentRequestBody template); CommentType getCommentType(); void setCommentType(CommentType commentType); String getCommentText(); void setCommentText(String commentText); @Override String toString(); @Override boolean equals(Object objectToCompare); @Override int hashCode();  }### Answer:
@Test public void testEquals() { assertFalse(getTestObject().equals("DummyString")); assertTrue(getTestObject().equals(getTestObject())); CommentRequestBody sameObject = getTestObject(); assertTrue(sameObject.equals(sameObject)); CommentRequestBody differentObject = getTestObject(); differentObject.setCommentType(CommentType.ANSWER); assertFalse(getTestObject().equals(differentObject)); }