### Question:
AssetComment extends AssetElementHeader { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof AssetComment)) { return false; } if (!super.equals(objectToCompare)) { return false; } AssetComment that = (AssetComment) objectToCompare; return Objects.equals(getCommentBean(), that.getCommentBean()) && Objects.equals(getCommentReplies(), that.getCommentReplies()); } AssetComment(Comment              commentBean,
                        AssetCommentReplies  commentReplies);  AssetComment(AssetDescriptor      parentAsset,
                           Comment              commentBean,
                           AssetCommentReplies  commentReplies);  AssetComment(AssetDescriptor parentAsset, AssetComment templateComment); boolean isPublic(); CommentType getCommentType(); String getUser(); String getCommentText(); AssetCommentReplies getCommentReplies(); @Override String toString(); @Override boolean equals(Object objectToCompare);  }### Answer:
@Test public void testEquals() { assertFalse(getTestObject().equals(null)); assertFalse(getTestObject().equals("DummyString")); assertTrue(getTestObject().equals(getTestObject())); AssetComment sameObject = getTestObject(); assertTrue(sameObject.equals(sameObject)); assertFalse(getTestObject().equals(getDifferentObject())); assertFalse(getTestObject().equals(getAnotherDifferentObject())); assertFalse(getTestObject().equals(getYetAnotherDifferentObject())); }