BooleanPredicate extends PredicateValue { @Override public int hashCode() { return value ? Boolean.TRUE.hashCode() : Boolean.FALSE.hashCode(); } BooleanPredicate(boolean value); boolean getValue(); BooleanPredicate setValue(boolean value); @Override BooleanPredicate clone(); @Override int hashCode(); @Override boolean equals(Object obj);  }
@Test public void requireThatHashCodeIsImplemented() { assertEquals(new BooleanPredicate(true).hashCode(), new BooleanPredicate(true).hashCode()); assertEquals(new BooleanPredicate(false).hashCode(), new BooleanPredicate(false).hashCode()); }