RepositoryConnection connection = ModelCommons.asRepository(model).getConnection();
connection.begin();
// run a SPARQL test to see if the returned data is correct
InputStream sparql = BaseLDCacheTest.class.getResourceAsStream(sparqlFile);
BooleanQuery testLabel = connection.prepareBooleanQuery(QueryLanguage.SPARQL, IOUtils.toString(sparql));
Assert.assertTrue("SPARQL test query failed", testLabel.evaluate());
if(log.isDebugEnabled()) {
StringWriter out = new StringWriter();
connection.export(Rio.createWriter(RDFFormat.TURTLE, out));
log.debug("DATA:");