### Question:
SchemaPathFilter implements Predicate<PropertyPath> { @Override public boolean apply(PropertyPath input) { return schema.find(input) != null; } SchemaPathFilter(Schema<?> schema); @Override boolean apply(PropertyPath input);  }### Answer:
@Test public void allow_only_root() { Schema<String> schema = Schema.<String>builder().build(); SchemaPathFilter filter = new SchemaPathFilter(schema); assertThat(filter.apply(ROOT)).isTrue(); assertThat(filter.apply(ROOT.property("a"))).isFalse(); }