### Question:
NullaryFunctionFunction implements Function<A, T> { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof NullaryFunctionFunction<?, ?>)) { return false; } NullaryFunctionFunction<?, ?> that = (NullaryFunctionFunction<?, ?>) obj; return this.function.equals(that.function); } NullaryFunctionFunction(NullaryFunction<? extends T> function); T evaluate(A obj); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); static NullaryFunctionFunction<A, T> adapt(NullaryFunction<? extends T> function);  }### Answer:
@Test public void testEquals() throws Exception { Function<Object, Object> f = new NullaryFunctionFunction<Object, Object>(Constant.of("xyzzy")); assertEquals(f,f); assertObjectsAreEqual(f,new NullaryFunctionFunction<Object, Object>(Constant.of("xyzzy"))); assertObjectsAreNotEqual(f,Constant.of("x")); assertObjectsAreNotEqual(f,new NullaryFunctionFunction<Object, Object>(Constant.of(null))); assertObjectsAreNotEqual(f,Constant.of(null)); assertTrue(!f.equals(null)); }