### Question:
Size implements Function<A, Integer> { @Override public boolean equals(Object that) { return that instanceof Size<?>; } Size(); Integer evaluate(Object obj); @Override boolean equals(Object that); @Override int hashCode(); @Override String toString(); static Size<Object> instance();  }### Answer:
@Test public void testEquals() throws Exception { Function<Object, Integer> f = new Size<Object>(); assertEquals(f, f); assertObjectsAreEqual(f, new Size<Object>()); assertObjectsAreEqual(f, Size.instance()); assertSame(Size.instance(), Size.instance()); assertObjectsAreNotEqual(f, new Constant<Object>(null)); assertTrue(!f.equals((Size<?>) null)); }