public void testWrapping()throws Exception{
Model model = ModelFactory.createDefaultModel();
InputStream in = this.getClass().getResourceAsStream("files/sample.rdf");
model.read(in,null);
String uri = "http://www.deri.ie/about/team/member/renaud_delbru#me";
PreviewResourceCannedQuery cannedQuery = new PreviewResourceCannedQuery(this.getClass().getResourceAsStream("files/preview_properties.properties"));
String sparql = cannedQuery.getPreviewQueryForResource(uri);
Query query = QueryFactory.create(sparql, Syntax.syntaxSPARQL_11);
QueryExecution qExec = QueryExecutionFactory.create(query, model);
ResultSet res = qExec.execSelect();
Multimap<String, String> map = cannedQuery.wrapResourcePropertiesMapResultSet(res);
assertEquals(map.size(),2);
assertEquals(map.get("labels"), Collections.singletonList("EN-Renaud"));
}