final RepositoryConnection connection = repositoryRDF.getConnection();
try {
final Facading facading = FacadingFactory.createFacading(connection);
final URI uri = connection.getValueFactory().createURI("http://www.example.com/rdf/test/locale");
final LocaleFacade f = facading.createFacade(uri, LocaleFacade.class);
f.setLabel(lbl);
assertEquals(lbl, f.getLabel());
assertNull(f.getLabel(none));
f.setLabel(lbl_de, de);
f.setLabel(lbl_en, en);
assertEquals(lbl_de, f.getLabel(de));
assertEquals(lbl_en, f.getLabel(en));
assertNull(f.getLabel(none));
f.setLabel(null);
assertNull(f.getLabel());
assertNull(f.getLabel(de));
assertNull(f.getLabel(en));
assertNull(f.getLabel(fr));
assertNull(f.getLabel(none));
f.setLabel(lbl_de, de);
f.setLabel(lbl_en, en);
f.setLabel(lbl_fr, fr);
f.setLabel(lbl_none, none);
assertEquals(lbl_de, f.getLabel(de));
assertEquals(lbl_en, f.getLabel(en));
assertEquals(lbl_fr, f.getLabel(fr));
assertEquals(lbl_none, f.getLabel(none));
assertThat(f.getLabel(), anyOf(is(lbl_de), is(lbl_en), is(lbl_fr), is(lbl_none)));
f.deleteLabel(en);
assertEquals(lbl_de, f.getLabel(de));
assertNull(f.getLabel(en));
assertEquals(lbl_fr, f.getLabel(fr));
assertEquals(lbl_none, f.getLabel(none));
f.setLabel(null, fr);
assertEquals(lbl_de, f.getLabel(de));
assertNull(f.getLabel(en));
assertNull(f.getLabel(fr));
assertEquals(lbl_none, f.getLabel(none));
f.setLabel(lbl);
assertEquals(lbl, f.getLabel());
assertNull(f.getLabel(de));
assertNull(f.getLabel(en));
assertNull(f.getLabel(fr));
assertNull(f.getLabel(none));
} finally {
connection.close();
}
}