@Override
public Predicate isTrue(Expression<Boolean> expression) {
if ( CompoundPredicate.class.isInstance( expression ) ) {
final CompoundPredicate predicate = (CompoundPredicate) expression;
if ( predicate.getExpressions().size() == 0 ) {
return new BooleanStaticAssertionPredicate(
this,
predicate.getOperator() == Predicate.BooleanOperator.AND
);
}
return predicate;