### Question:
RatingTo { @Override public boolean equals(final Object other) { if (!(other instanceof RatingTo)) return false; RatingTo castOther = (RatingTo) other; return new EqualsBuilder().append(percentage, castOther.percentage) .isEquals(); } RatingTo(int percentage); int getPercentage(); @Override int hashCode(); @Override boolean equals(final Object other); @Override String toString();  }### Answer:
@Test public void testEquals() { for (int i = 0; i <= 100; i++) { RatingTo rating1 = new RatingTo(i); RatingTo rating2 = new RatingTo(i); assertEquals(rating1, rating2); } }
@Test public void testNotEquals1() { for (int i = 0; i < 100; i++) { RatingTo rating1 = new RatingTo(i); RatingTo rating2 = new RatingTo(i + 1); assertFalse(rating1.equals(rating2)); } }
@Test public void testNotEquals2() { for (int i = 0; i < 100; i++) { RatingTo rating1 = new RatingTo(i + 1); RatingTo rating2 = new RatingTo(i); assertFalse(rating1.equals(rating2)); } }