### Question:
RESTService { @GET @Context @Path("/classes") @Produces(MediaType.APPLICATION_JSON) public List<String> getClasses(@Context ServletContext context) { logger.info("REST Request - Get all classes"); List<String> classes = classesCache.get(ks); if(classes == null){ classes = new ArrayList<>(); for (OWLClass cls : reasoner.getNonEmptyOWLClasses()) { if ((namespace != null && cls.toStringID().startsWith(namespace)) && !blackList.contains(cls.toStringID())) { classes.add(cls.toStringID()); } } Collections.sort(classes); classesCache.put(ks, classes); } logger.info("Done."); return classes; } 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 testGetClasses() { List<String> classes = restService.getClasses(null); System.out.println(classes.size()); }