try {
connection.begin();
final Facading facading = FacadingFactory.createFacading(connection);
URI uri = connection.getValueFactory().createURI("http://www.example.com/rdf/test/collections");
CollectionFacade facade = facading.createFacade(uri, CollectionFacade.class);
facade.setDates(Arrays.asList(a, b, c));
Assert.assertThat(facade.getDates(), hasItems(a, b, c));
facade.addDate(e);
Assert.assertThat(facade.getDates(), hasItems(c, e, b, a));
facade.setDates(Arrays.asList(a, d, now));
Assert.assertThat(facade.getDates(), hasItems(a, d, now));
Assert.assertThat(facade.getDates(), CoreMatchers.not(hasItems(c, e, b)));
facade.deleteDates();
Assert.assertEquals(facade.getDates().size(), 0);
connection.commit();
} finally {
connection.close();
}