Unit test for predicate