SimpleOntologyManager extends AbstractOntologyManager { @Modified protected void modified(Map<String, Object> props) { start(props); } SimpleOntologyManager(); @Reference void setValueFactory(ValueFactory valueFactory); @Reference void setModelFactory(ModelFactory modelFactory); @Reference void setSesameTransformer(SesameTransformer sesameTransformer); @Reference void setCatalogManager(CatalogManager catalogManager); @Reference void setRepositoryManager(RepositoryManager repositoryManager); @Reference void setBranchFactory(BranchFactory branchFactory); @Reference(type = '*', dynamic = true, optional = true) void addOntologyCache(OntologyCache ontologyCache); void removeOntologyCache(OntologyCache ontologyCache); @Reference void setbNodeService(BNodeService bNodeService); @Override Ontology createOntology(InputStream inputStream, boolean resolveImports); @Override Ontology createOntology(Model model); @Override Ontology applyChanges(Ontology ontology, Difference difference); @Override OntologyId createOntologyId(); @Override OntologyId createOntologyId(Resource resource); @Override OntologyId createOntologyId(IRI ontologyIRI); @Override OntologyId createOntologyId(IRI ontologyIRI, IRI versionIRI); @Override OntologyId createOntologyId(Model model);  }
@Test public void testActivate() { Map<String, Object> props = new HashMap<>(); props.put("poolSize", 0); manager.modified(props); ForkJoinPool pool = Whitebox.getInternalState(manager, "threadPool"); assertTrue(pool.getParallelism() > 0); props.put("poolSize", -1); manager.modified(props); pool = Whitebox.getInternalState(manager, "threadPool"); assertEquals(pool.getParallelism(), 1); props.put("poolSize", 1); manager.modified(props); pool = Whitebox.getInternalState(manager, "threadPool"); assertEquals(pool.getParallelism(), 1); props.put("poolSize", 2); manager.modified(props); pool = Whitebox.getInternalState(manager, "threadPool"); assertEquals(pool.getParallelism(), 2); }