ObjectHelper.notNull(predicate, "predicate");
ObjectHelper.notNull(exchange, "exchange");
if (predicate instanceof BinaryPredicate) {
// special for binary evaluable as we can get more detailed information
BinaryPredicate eval = (BinaryPredicate) predicate;
String evalText = eval.matchesReturningFailureMessage(exchange);
if (evalText != null) {
throw new AssertionError(text + predicate + " evaluated as: " + evalText + " on " + exchange);
}
} else {
doAssertMatches(predicate, text, exchange);