### Question:
RESTService { public void precomputeGraphs(ServletContext context){ logger.info("Precomputing graphs..."); DatasetBasedGraphGenerator graphGenerator = new CachedDatasetBasedGraphGenerator(qef, cacheDirectory); Map<String, List<String>> entities = getEntities(null); for (String cls : entities.keySet()) { try { logger.info(cls); graphGenerator.generateGraph(new OWLClassImpl(IRI.create(cls)), propertyFrequencyThreshold, namespace, cooccurrenceType); } catch (Exception e) { logger.error(e.getLocalizedMessage(), e); } } } RESTService(); static void loadConfig(HierarchicalINIConfiguration config); static void loadConfig(HierarchicalINIConfiguration config, ServletContext context); static void init(ServletContext context); @GET @Context @Path("/questionsold") @Produces(MediaType.APPLICATION_JSON) RESTQuestions getQuestionsJSON(@Context ServletContext context, @QueryParam("domain") String domain, @QueryParam("type") List<String> questionTypes, @QueryParam("limit") int maxNrOfQuestions); @POST @Context @Path("/questions") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) RESTQuestions getQuestionsJSON2(@Context ServletContext context, JSONArray domain, @QueryParam("type") List<String> questionTypes, @QueryParam("limit") int maxNrOfQuestions); @GET @Context @Path("/properties") @Produces(MediaType.APPLICATION_JSON) List<String> getApplicableProperties(@Context ServletContext context, @QueryParam("class") String classURI); @GET @Context @Path("/classes") @Produces(MediaType.APPLICATION_JSON) List<String> getClasses(@Context ServletContext context); @GET @Context @Path("/entities") @Produces(MediaType.APPLICATION_JSON) Map<String, List<String>> getEntities(@Context ServletContext context); void precomputeGraphs(ServletContext context); static QueryExecutionFactory qef; }### Answer:
@Test public void testPrecomputeGraphs() { restService.precomputeGraphs(null); }