@Test void testGetOntologiesList() { ontologyEntity = mock(org.molgenis.ontology.core.meta.Ontology.class); when(ontologyEntity.getString(ID)).thenReturn("1"); when(ontologyEntity.getString(ONTOLOGY_IRI)).thenReturn("http: when(ontologyEntity.getString(ONTOLOGY_NAME)).thenReturn("testOntology"); @SuppressWarnings("unchecked") ArgumentCaptor<Stream<Object>> idCaptor = ArgumentCaptor.forClass(Stream.class); when(dataService.findAll( eq(ONTOLOGY), idCaptor.capture(), eq(org.molgenis.ontology.core.meta.Ontology.class))) .thenReturn(Stream.of(ontologyEntity)); List<Ontology> ontologies = ontologyRepository.getOntologies(singletonList("1")).collect(toList()); assertEquals(asList(create("1", "http: assertEquals(singletonList("1"), idCaptor.getValue().collect(toList())); }
public Stream<Ontology> getOntologies() { return dataService.findAll(ONTOLOGY).map(OntologyRepository::toOntology); }
OntologyRepository { public Stream<Ontology> getOntologies() { return dataService.findAll(ONTOLOGY).map(OntologyRepository::toOntology); } }
OntologyRepository { public Stream<Ontology> getOntologies() { return dataService.findAll(ONTOLOGY).map(OntologyRepository::toOntology); }  }
OntologyRepository { public Stream<Ontology> getOntologies() { return dataService.findAll(ONTOLOGY).map(OntologyRepository::toOntology); }  Stream<Ontology> getOntologies(); Stream<Ontology> getOntologies(List<String> ontologyIds); Ontology getOntology(String iri); }
OntologyRepository { public Stream<Ontology> getOntologies() { return dataService.findAll(ONTOLOGY).map(OntologyRepository::toOntology); }  Stream<Ontology> getOntologies(); Stream<Ontology> getOntologies(List<String> ontologyIds); Ontology getOntology(String iri);  }