Main { public static void main(String[] args) { SLF4JBridgeHandler.removeHandlersForRootLogger(); SLF4JBridgeHandler.install(); LOGGER.info("Arguments Received: {}", Arrays.asList(args)); ArgsConfig argsConfig = new ArgsConfig(); JCommander jCommander = JCommander.newBuilder() .addObject(argsConfig) .build(); jCommander.setProgramName("GeoSPARQL Fuseki"); jCommander.parse(args); if (argsConfig.isHelp()) { jCommander.usage(); return; } try { Dataset dataset = DatasetOperations.setup(argsConfig); GeosparqlServer server = new GeosparqlServer(argsConfig.getPort(), argsConfig.getDatsetName(), argsConfig.isLoopbackOnly(), dataset, argsConfig.isUpdateAllowed()); server.start(); } catch (SrsException | DatasetException | SpatialIndexException ex) { LOGGER.error("GeoSPARQL Server: Exiting - {}: {}", ex.getMessage(), argsConfig.getDatsetName()); } }  static void main(String[] args);  }
@Test public void testMain() { System.out.println("main"); String query = "PREFIX geo: <http: + "\n" + "SELECT ?obj\n" + "WHERE{\n" + " <http: + "}ORDER by ?obj"; List<Resource> result = new ArrayList<>(); try (QueryExecution qe = QueryExecutionFactory.sparqlService(SERVER.getLocalServiceURL(), query)) { ResultSet rs = qe.execSelect(); while (rs.hasNext()) { QuerySolution qs = rs.nextSolution(); Resource obj = qs.getResource("obj"); result.add(obj); } } List<Resource> expResult = new ArrayList<>(); expResult.add(ResourceFactory.createResource("http: expResult.add(ResourceFactory.createResource("http: expResult.add(ResourceFactory.createResource("http: expResult.add(ResourceFactory.createResource("http: expResult.add(ResourceFactory.createResource("http: expResult.add(ResourceFactory.createResource("http: expResult.add(ResourceFactory.createResource("http: expResult.add(ResourceFactory.createResource("http: assertEquals(expResult, result); }