OrganismPartGroupingService { public Map<ColumnGroup, Set<OntologyTerm>> getAnatomicalSystemsGrouping(Collection<OntologyTerm> ontologyTerms) { return getGrouping(ontologyTerms, term -> anatomicalSystemsMap.get().get(term.accession())); } @Inject  OrganismPartGroupingService(Path anatomicalSystemsFilePath, Path organsFilePath); Map<ColumnGroup, Set<OntologyTerm>> getAnatomicalSystemsGrouping(Collection<OntologyTerm> ontologyTerms); Map<ColumnGroup, Set<OntologyTerm>> getOrgansGrouping(Collection<OntologyTerm> ontologyTerms);  }
@Test public void readAnatomicalSystems() { setAnatomicalSystems("UBERON_0000060\tanatomical wall\tUBERON_0003688\tomentum"); assertThat( subject.getAnatomicalSystemsGrouping(ImmutableList.of(OntologyTerm.create(""))).entrySet(), empty()); assertThat( subject.getAnatomicalSystemsGrouping( ImmutableList.of(OntologyTerm.create("UBERON_0003688", "omentum"))).entrySet(), not(empty())); }