FactorGroupingService { boolean hasOntologyTerms(Map<ColumnGroup, Set<OntologyTerm>> m) { return m.values().stream().map(Set::size).reduce(0, (integer, integer2) -> integer + integer2) > 0; } FactorGroupingService(OrganismPartGroupingService organismPartGroupingService); JsonArray group(String defaultQueryFactorType,
                           Collection<FactorAcrossExperiments> factorsAcrossExperiments);  }
@Test public void hasOntologyTerms() { assertThat( subject.hasOntologyTerms(ImmutableMap.of()), is(false)); assertThat( subject.hasOntologyTerms(ImmutableMap.of(ColumnGroup.create("", ""), ImmutableSet.of())), is(false)); assertThat( subject.hasOntologyTerms( ImmutableMap.of(ColumnGroup.create("", ""), ImmutableSet.of(OntologyTerm.create("")))), is(true)); }