public void testDBPedia() throws Exception {
ClientConfiguration config = new ClientConfiguration();
config.addEndpoint(new StanbolEndpoint("DBPedia (Stanbol Cache)","http://dev.iks-project.eu:8080/entityhub/site/dbpedia/","^http://dbpedia\\.org/resource/.*"));
LDClientService ldclient = new TestLDClient(new LDClient(config));
Assume.assumeTrue(ldclient.ping("http://dev.iks-project.eu:8080/"));
String uriBerlin = "http://dbpedia.org/resource/Berlin";
ClientResponse respBerlin = ldclient.retrieveResource(uriBerlin);
RepositoryConnection conBerlin = respBerlin.getTriples().getConnection();
conBerlin.begin();
Assert.assertTrue(conBerlin.size() > 0);
// run a SPARQL test to see if the returned data is correct
InputStream sparql = this.getClass().getResourceAsStream("dbpedia-berlin.sparql");
BooleanQuery testLabel = conBerlin.prepareBooleanQuery(QueryLanguage.SPARQL, IOUtils.toString(sparql));
Assert.assertTrue("SPARQL test query failed", testLabel.evaluate());
conBerlin.commit();
conBerlin.close();
ldclient.shutdown();
}