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