### Question:
NotOperator extends AbstractOperator implements LogicalOperator { @Override public Predicate toPredicate(Predicate left, Predicate right) { return new NotPredicate(right); } NotOperator(int ctxPrecedence); @Override TYPE getType(); @Override String getName(); @Override int getBasePrecedence(); @Override Predicate toPredicate(Predicate left, Predicate right); @Override String toString();  }### Answer:
@Test public void testToPredicate() { EqualsPredicate p = new EqualsPredicate<>("prop", "val"); NotPredicate notPredicate = new NotPredicate(p); assertEquals(notPredicate, new NotOperator(1).toPredicate(null, p)); }