}
@Test
public void testNotAndParenOr()
{
final Predicate parsed = PredicateExpressionParser.parse("!com.linkedin.data.it.AlwaysTruePredicate & !(com.linkedin.data.it.AlwaysTruePredicate | com.linkedin.data.it.AlwaysFalsePredicate)");
Assert.assertEquals(parsed.getClass(), AndPredicate.class);
final List<Predicate> andChildren = ((AndPredicate) parsed).getChildPredicates();
Assert.assertEquals(andChildren.get(0).getClass(), NotPredicate.class);
Assert.assertEquals(andChildren.get(1).getClass(), NotPredicate.class);
final Predicate notChild1 = ((NotPredicate) andChildren.get(0)).getChildPredicate();
Assert.assertEquals(notChild1.getClass(), AlwaysTruePredicate.class);
final Predicate notChild2 = ((NotPredicate) andChildren.get(1)).getChildPredicate();
Assert.assertEquals(notChild2.getClass(), OrPredicate.class);
final List<Predicate> orChildren = ((OrPredicate) notChild2).getChildPredicates();
Assert.assertEquals(orChildren.get(0).getClass(), AlwaysTruePredicate.class);
Assert.assertEquals(orChildren.get(1).getClass(), AlwaysFalsePredicate.class);
}