RDF4JProtocolSession extends SPARQLProtocolSession { public void getRepositoryConfig(StatementCollector statementCollector) throws UnauthorizedException, QueryInterruptedException, RDFHandlerException, RepositoryException, IOException { checkRepositoryURL(); try { String baseLocation = Protocol.getRepositoryConfigLocation(getRepositoryURL()); URIBuilder url = new URIBuilder(baseLocation); HttpRequestBase method = new HttpGet(url.build()); method = applyAdditionalHeaders(method); try { getRDF(method, statementCollector, true); } catch (MalformedQueryException e) { logger.warn("Server reported unexpected malformed query error", e); throw new RepositoryException(e.getMessage(), e); } finally { method.reset(); } } catch (URISyntaxException e) { throw new AssertionError(e); } } RDF4JProtocolSession(HttpClient client, ScheduledExecutorService executor); void setServerURL(String serverURL); String getServerURL(); String getRepositoryURL(); void setRepository(String repositoryURL); @Override String getUpdateURL(); @Override void close(); TupleQueryResult getRepositoryList(); void getRepositoryList(TupleQueryResultHandler handler); String getServerProtocol(); long size(Resource... contexts); void createRepository(RepositoryConfig config); void updateRepository(RepositoryConfig config); void deleteRepository(String repositoryID); void getRepositoryConfig(StatementCollector statementCollector); TupleQueryResult getNamespaces(); void getNamespaces(TupleQueryResultHandler handler); String getNamespace(String prefix); void setNamespacePrefix(String prefix, String name); void removeNamespacePrefix(String prefix); void clearNamespaces(); TupleQueryResult getContextIDs(); void getContextIDs(TupleQueryResultHandler handler); void getStatements(Resource subj, IRI pred, Value obj, boolean includeInferred, RDFHandler handler,
			Resource... contexts); synchronized void beginTransaction(IsolationLevel isolationLevel); synchronized void beginTransaction(TransactionSetting... transactionSettings); synchronized void commitTransaction(); synchronized void rollbackTransaction(); @Deprecated void sendTransaction(final Iterable<? extends TransactionOperation> txn); void addData(InputStream contents, String baseURI, RDFFormat dataFormat, Resource... contexts); void removeData(InputStream contents, String baseURI, RDFFormat dataFormat, Resource... contexts); void upload(InputStream contents, String baseURI, RDFFormat dataFormat, boolean overwrite,
			boolean preserveNodeIds, Resource... contexts); void upload(final Reader contents, String baseURI, final RDFFormat dataFormat, boolean overwrite,
			boolean preserveNodeIds, Resource... contexts); @Override void setUsernameAndPassword(String username, String password);  }
@Test public void testGetRepositoryConfig() throws Exception { ArgumentCaptor<HttpGet> method = ArgumentCaptor.forClass(HttpGet.class); Header h = new BasicHeader("Content-Type", RDFFormat.NTRIPLES.getDefaultMIMEType()); stubFor(get(urlEqualTo("/rdf4j-server/repositories/test/config")) .willReturn(aResponse().withStatus(200) .withHeader("Content-Type", RDFFormat.NTRIPLES.getDefaultMIMEType()) .withBodyFile("repository-config.nt"))); subject.getRepositoryConfig(new StatementCollector()); verify(getRequestedFor(urlEqualTo("/rdf4j-server/repositories/test/config"))); verifyHeader("/rdf4j-server/repositories/test/config"); }