Negation extends PredicateOperator { @Override public int hashCode() { return operand.hashCode(); } Negation(Predicate operand); Negation setOperand(Predicate operand); Predicate getOperand(); @Override List<Predicate> getOperands(); @Override Negation clone(); @Override int hashCode(); @Override boolean equals(Object obj);  }
@Test public void requireThatHashCodeIsImplemented() { Predicate predicate = SimplePredicates.newPredicate(); assertEquals(new Negation(predicate).hashCode(), new Negation(predicate).hashCode()); }