FilterOperator extends AbstractOperator implements RelationalOperator { @Override public Predicate toPredicate(String prop, String val) throws InvalidQueryException { if (val == null) { throw new InvalidQueryException("Filter operator is missing a required right operand."); } return new FilterPredicate(prop, val); } FilterOperator(); @Override String getName(); @Override Predicate toPredicate(String prop, String val); @Override TYPE getType();  }
@Test public void testToPredicate() throws Exception { assertEquals(new FilterPredicate("p1", ".*"), new FilterOperator().toPredicate("p1", ".*")); }