### Question:
Filter implements Predicate { public static Filter parse(String filter){ return FilterCompiler.compile(filter); }  static Filter filter(Predicate predicate); static Filter filter(Collection<Predicate> predicates); @Override abstract boolean apply(PredicateContext ctx); Filter or(final Predicate other); Filter and(final Predicate other); static Filter parse(String filter);  }### Answer:
@Test public void criteria_can_be_parsed() { Filter criteria = Filter.parse("[?(@.foo == 'baar')]"); assertThat(criteria.toString()).isEqualTo("[?(@['foo'] == 'baar')]"); criteria = Filter.parse("[?(@.foo)]"); assertThat(criteria.toString()).isEqualTo("[?(@['foo'])]"); }