### Question:
NullaryPredicateNullaryFunction implements NullaryFunction<Boolean> { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof NullaryPredicateNullaryFunction)) { return false; } NullaryPredicateNullaryFunction that = (NullaryPredicateNullaryFunction) obj; return this.predicate.equals(that.predicate); } NullaryPredicateNullaryFunction(NullaryPredicate predicate); Boolean evaluate(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); static NullaryPredicateNullaryFunction adapt(NullaryPredicate predicate);  }### Answer:
@Test public void testEquals() throws Exception { NullaryFunction<Boolean> f = new NullaryPredicateNullaryFunction(Constant.TRUE); assertEquals(f,f); assertObjectsAreEqual(f,new NullaryPredicateNullaryFunction(Constant.TRUE)); assertObjectsAreNotEqual(f,Constant.of("x")); assertObjectsAreNotEqual(f,new NullaryPredicateNullaryFunction(Constant.FALSE)); assertTrue(!f.equals(null)); }