### Question:
EqualPredicate implements Predicate<T>, Serializable { public static <T> Predicate<T> equalPredicate(final T object) { if (object == null) { return NullPredicate.nullPredicate(); } return new EqualPredicate<T>(object); } EqualPredicate(final T object);  EqualPredicate(final T object, final Equator<T> equator); static Predicate<T> equalPredicate(final T object); static Predicate<T> equalPredicate(final T object, final Equator<T> equator); boolean evaluate(final T object); Object getValue();  }### Answer:
@Test public void testNullArgumentEqualsNullPredicate() throws Exception { assertSame(nullPredicate(), equalPredicate(null)); }
@Test public void objectFactoryUsesEqualsForTest() throws Exception { final Predicate<EqualsTestObject> predicate = equalPredicate(FALSE_OBJECT); assertFalse(predicate, FALSE_OBJECT); assertTrue(equalPredicate(TRUE_OBJECT), TRUE_OBJECT); }
@SuppressWarnings("boxing") @Test public void testPredicateTypeCanBeSuperClassOfObject() throws Exception { final Predicate<Number> predicate = equalPredicate((Number) 4); assertTrue(predicate, 4); }