@Test
public void testDefaultURI() {
String defGraphQuery = "SELECT ?s WHERE { ?s a ?o }";
SPARQLQueryDefinition qdef = smgr.newQueryDefinition(defGraphQuery);
qdef.setIncludeDefaultRulesets(false);
qdef.setOptimizeLevel(1);
assertEquals(1, qdef.getOptimizeLevel());
ArrayNode bindings = executeAndExtractBindings(qdef);
qdef.setDefaultGraphUris("http://marklogic.com/SPARQLQDefTest/g4");
bindings = executeAndExtractBindings(qdef);
assertEquals("Single graphs has one assertion", 1, bindings.size());
qdef.setDefaultGraphUris("http://marklogic.com/SPARQLQDefTest/g4",
"http://marklogic.com/SPARQLQDefTest/g2");
bindings = executeAndExtractBindings(qdef);
assertEquals("Union two default graphs has two assertions", 2,
bindings.size());
}