PathTemplateFilter { abstract FilteredAddress filter(PathAddress address);  abstract boolean hasPathTemplate(String pathTemplateName); static PathTemplateFilter parse(List<String> attributes); static Builder create(String pathTemplate);  }
@Test public void testFilter() { PathTemplateFilter filter = PathTemplateFilter.create("foo").include("bar").build(); PathAddress address = PathAddress.pathAddress("some", "path"); address.addPathTemplateResolver(new PathTemplateResolver() { @Override public String resolve(String templateName) { if (templateName.equals("foo")) return "bar"; return null; } }); Assert.assertTrue(address.accepts(filter)); filter = PathTemplateFilter.create("foo").include("bar", "foobar").build(); address = PathAddress.pathAddress("some", "path"); address.addPathTemplateResolver(new PathTemplateResolver() { @Override public String resolve(String templateName) { if (templateName.equals("foo")) return "foobar"; return null; } }); Assert.assertTrue(address.accepts(filter)); }