### Question:
IsWithinRange implements Predicate<A> { @Override public final boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof IsWithinRange<?>)) { return false; } final IsWithinRange<?> isWithinRange = (IsWithinRange<?>) o; return max.equals(isWithinRange.max) && min.equals(isWithinRange.min); } IsWithinRange(A min, A max); final boolean test(A o); @Override final boolean equals(Object o); @Override int hashCode(); @Override String toString(); static IsWithinRange<A> instance(A min, A max);  }### Answer:
@Test public void testEquals() throws Exception { IsWithinRange<Integer> p1 = new IsWithinRange<Integer>(Integer.valueOf(5), Integer.valueOf(10)); IsWithinRange<Integer> p2 = new IsWithinRange<Integer>(Integer.valueOf(5), Integer.valueOf(10)); assertEquals(p1, p2); p2 = new IsWithinRange<Integer>(Integer.valueOf(5), Integer.valueOf(11)); assertTrue(!p1.equals(p2)); p2 = new IsWithinRange<Integer>(Integer.valueOf(6), Integer.valueOf(10)); assertTrue(!p1.equals(p2)); }