### Question:
RatingRequestBody extends FeedbackRequestBody { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (objectToCompare == null || getClass() != objectToCompare.getClass()) { return false; } RatingRequestBody that = (RatingRequestBody) objectToCompare; return isPublic() == that.isPublic() && getStarRating() == that.getStarRating() && Objects.equals(getReview(), that.getReview()); } RatingRequestBody();  RatingRequestBody(RatingRequestBody template); StarRating getStarRating(); void setStarRating(StarRating starRating); String getReview(); void setReview(String review); @Override String toString(); @Override boolean equals(Object objectToCompare); @Override int hashCode();  }### Answer:
@Test public void testEquals() { assertFalse(getTestObject().equals("DummyString")); assertTrue(getTestObject().equals(getTestObject())); RatingRequestBody sameObject = getTestObject(); assertTrue(sameObject.equals(sameObject)); RatingRequestBody differentObject = getTestObject(); differentObject.setStarRating(StarRating.ONE_STAR); assertFalse(getTestObject().equals(differentObject)); }