}
@Test
public void testPredicateBuilder() throws RepositoryException {
final URI u = connection.getValueFactory().createURI("http://localhost/repository/testResource1");
ExampleFacade f = facading.createFacade(u, ExampleFacade.class);
String title = "Example Title";
Set<String> tags = new HashSet<String>();
tags.add("Foo");
tags.add("Bar");
f.setTitle(title);
f.setTags(tags);
checkStatement(u, ExampleFacade.NS + "title", title);
checkStatement(u, ExampleFacade.NS + "tag", "Foo");
checkStatement(u, ExampleFacade.NS + "tag", "Bar");
Assert.assertEquals(f.getTitle(), title);
Assert.assertThat(f.getTags(), allOf(hasItem("Foo"), hasItem("Bar")));
f.addTag("FooBar");
checkStatement(u, ExampleFacade.NS + "tag", "FooBar");
Assert.assertThat(f.getTags(), allOf(hasItem("FooBar"), hasItem("Foo"), hasItem("Bar")));
}