@Test public void shouldDelegateThroughToEqualsOnInitialisedObjectWithSuppliedObjectAndReturnTheResult() throws Exception { Name first = name("James"); Name second = name("James"); EqualsPredicate<Name> predicate = new EqualsPredicate<Name>(first); Boolean result = predicate.evaluate(second); assertThat(result, is(true)); }
@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();  }