public void testMetadata() throws Exception {
URL serviceUrl = new URL("http://example.org/sparql");
// dummy data source to pass the URL down to the parser.
ProtocolDataSource ds = new ProtocolDataSource(serviceUrl);
try {
Connection c = ds.getConnection(NoCredentials.INSTANCE);
Command cmd = c.createCommand("SELECT foo"); // query isn't actually executed.
metadataTest(cmd, "results-with-metadata",
"http://sample.org/metadata.rdf", "http://example.org/service-description.rdf");
metadataTest(cmd, "results-with-base-uri",
"http://sample.org/metadata.rdf", "http://revelytix.com/ns/service-description.rdf", "http://example.com/sparql.ttl");