@Test void testGetOntologiesList() { List<String> ontologyIds = asList("id0", "id1"); Ontology ontology0 = mock(Ontology.class); Ontology ontology1 = mock(Ontology.class); when(ontologyRepository.getOntologies(ontologyIds)).thenReturn(Stream.of(ontology0, ontology1)); assertEquals(asList(ontology0, ontology1), ontologyServiceImpl.getOntologies(ontologyIds)); }
@Override public List<Ontology> getOntologies() { return ontologyRepository.getOntologies().collect(toList()); }
OntologyServiceImpl implements OntologyService { @Override public List<Ontology> getOntologies() { return ontologyRepository.getOntologies().collect(toList()); } }
OntologyServiceImpl implements OntologyService { @Override public List<Ontology> getOntologies() { return ontologyRepository.getOntologies().collect(toList()); } OntologyServiceImpl(
      OntologyRepository ontologyRepository, OntologyTermRepository ontologyTermRepository); }
OntologyServiceImpl implements OntologyService { @Override public List<Ontology> getOntologies() { return ontologyRepository.getOntologies().collect(toList()); } OntologyServiceImpl(
      OntologyRepository ontologyRepository, OntologyTermRepository ontologyTermRepository); @Override List<Ontology> getOntologies(); @Override List<Ontology> getOntologies(List<String> ontologyIds); @Override List<String> getAllOntologiesIds(); @Override Ontology getOntology(String name); @Override OntologyTerm getOntologyTerm(String iri); @Override List<OntologyTerm> findExactOntologyTerms(
      List<String> ontologyIds, Set<String> terms, int pageSize); @Override List<OntologyTerm> findOntologyTerms(
      List<String> ontologyIds, Set<String> terms, int pageSize); @Override List<OntologyTerm> getChildren(OntologyTerm ontologyTerm); @Override Integer getOntologyTermDistance(OntologyTerm ontologyTerm1, OntologyTerm ontologyTerm2); }
OntologyServiceImpl implements OntologyService { @Override public List<Ontology> getOntologies() { return ontologyRepository.getOntologies().collect(toList()); } OntologyServiceImpl(
      OntologyRepository ontologyRepository, OntologyTermRepository ontologyTermRepository); @Override List<Ontology> getOntologies(); @Override List<Ontology> getOntologies(List<String> ontologyIds); @Override List<String> getAllOntologiesIds(); @Override Ontology getOntology(String name); @Override OntologyTerm getOntologyTerm(String iri); @Override List<OntologyTerm> findExactOntologyTerms(
      List<String> ontologyIds, Set<String> terms, int pageSize); @Override List<OntologyTerm> findOntologyTerms(
      List<String> ontologyIds, Set<String> terms, int pageSize); @Override List<OntologyTerm> getChildren(OntologyTerm ontologyTerm); @Override Integer getOntologyTermDistance(OntologyTerm ontologyTerm1, OntologyTerm ontologyTerm2);  }