@Test public void shouldNotThrowNullPointerExceptionIfControlObjectIsNull() throws Exception { Object first = null; Object second = new Object(); EqualsPredicate<Object> predicate = new EqualsPredicate<Object>(first); try { predicate.evaluate(second); } catch(NullPointerException exception) { fail("Expected no NullPointerException to be thrown but one was."); } }
@Override public boolean evaluate(T other) { return Objects.equal(controlObject, other); }
EqualsPredicate implements Predicate<T> { @Override public boolean evaluate(T other) { return Objects.equal(controlObject, other); } }
EqualsPredicate implements Predicate<T> { @Override public boolean evaluate(T other) { return Objects.equal(controlObject, other); } EqualsPredicate(T controlObject); }
EqualsPredicate implements Predicate<T> { @Override public boolean evaluate(T other) { return Objects.equal(controlObject, other); } EqualsPredicate(T controlObject); @Override boolean evaluate(T other); @Override boolean equals(Object other); @Override int hashCode(); }
EqualsPredicate implements Predicate<T> { @Override public boolean evaluate(T other) { return Objects.equal(controlObject, other); } EqualsPredicate(T controlObject); @Override boolean evaluate(T other); @Override boolean equals(Object other); @Override int hashCode();  }