### Question:
Max implements BinaryFunction<T, T, T> { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof Max<?>)) { return false; } Max<?> that = (Max<?>) obj; return this.comparator.equals(that.comparator); } @SuppressWarnings("unchecked")  Max();  Max(Comparator<T> comparator); T evaluate(T left, T right); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); static Max<T> instance(); static Function<T, T> instance(T right); static final Max<Comparable<?>> INSTANCE; }### Answer:
@Test public void testEquals() { Max<Comparable<?>> f = Max.instance(); assertObjectsAreEqual(f,f); assertObjectsAreEqual(f,Max.instance()); assertObjectsAreEqual(f,new Max<Integer>(ComparableComparator.<Integer>instance())); assertObjectsAreNotEqual(f,new Max<Comparable<?>>(Collections.<Comparable<?>>reverseOrder())); assertFalse(f.equals(null)); }