### Question:
NullaryNot implements NullaryPredicate { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof NullaryNot)) { return false; } NullaryNot that = (NullaryNot) obj; return this.predicate.equals(that.predicate); } NullaryNot(NullaryPredicate predicate); boolean test(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); static NullaryPredicate not(NullaryPredicate that);  }### Answer:
@Test public void testEquals() throws Exception { NullaryNot p = new NullaryNot(Constant.TRUE); assertEquals(p,p); assertObjectsAreEqual(p,new NullaryNot(Constant.TRUE)); assertObjectsAreEqual(p,NullaryNot.not(Constant.TRUE)); assertObjectsAreNotEqual(p,new NullaryNot(Constant.FALSE)); assertObjectsAreNotEqual(p,Constant.TRUE); assertTrue(!p.equals(null)); }