### Question:
EqualsHelper { public static <T> boolean equalsCustom (@Nullable final T aObj1, @Nullable final T aObj2, @Nonnull final BiPredicate <T, T> aPredicate) { ValueEnforcer.notNull (aPredicate, "Predicate"); if (identityEqual (aObj1, aObj2)) return true; if (aObj1 == null || aObj2 == null) return false; return aPredicate.test (aObj1, aObj2); } private  EqualsHelper(); static boolean identityEqual(@Nullable final T aObj1, @Nullable final T aObj2); static boolean equals(final boolean aObj1, final boolean aObj2); static boolean equals(final byte aObj1, final byte aObj2); static boolean equals(final char aObj1, final char aObj2); static boolean equals(final double aObj1, final double aObj2); static boolean equals(final float aObj1, final float aObj2); static boolean equals(final int aObj1, final int aObj2); static boolean equals(final long aObj1, final long aObj2); static boolean equals(final short aObj1, final short aObj2); static boolean equals(@Nullable final Object aObj1, @Nullable final Object aObj2); @SuppressFBWarnings ({ "ES_COMPARING_PARAMETER_STRING_WITH_EQ" }) static boolean equalsIgnoreCase(@Nullable final String sObj1, @Nullable final String sObj2); static boolean equalsCollectionOnly(@Nonnull final Collection <T> aCont1, @Nonnull final Collection <?> aCont2); static boolean equalsMap(@Nonnull final Map <K, V> aCont1, @Nonnull final Map <?, ?> aCont2); static boolean equalsSet(@Nonnull final Set <T> aCont1, @Nonnull final Set <?> aCont2); static boolean equalsIterator(@Nonnull final Iterator <T> aIter1, final Iterator <?> aIter2); static boolean equalsEumeration(@Nonnull final Enumeration <T> aEnum1, final Enumeration <?> aEnum2); static boolean equalsCollection(@Nullable final Object aObj1, @Nullable final Object aObj2); static boolean equalsAsList(@Nullable final Object aObj1, @Nullable final Object aObj2); static boolean equalsCustom(@Nullable final T aObj1, @Nullable final T aObj2, @Nonnull final BiPredicate <T, T> aPredicate);  }### Answer:
@Test public void testEqualsCustom () { final MutableBoolean aPredCalled = new MutableBoolean (false); final BiPredicate <String, String> aPredicate = (x, y) -> { aPredCalled.set (true); return true; }; assertTrue (EqualsHelper.equalsCustom (null, null, aPredicate)); assertFalse (aPredCalled.booleanValue ()); assertFalse (EqualsHelper.equalsCustom ("a", null, aPredicate)); assertFalse (aPredCalled.booleanValue ()); assertFalse (EqualsHelper.equalsCustom (null, "a", aPredicate)); assertFalse (aPredCalled.booleanValue ()); assertTrue (EqualsHelper.equalsCustom ("b", "a", aPredicate)); assertTrue (aPredCalled.booleanValue ()); }