TermIds { public static Set<TermId> augmentWithAncestors( Ontology ontology, Set<TermId> termIds, boolean includeRoot) { termIds.addAll(ontology.getAllAncestorTermIds(termIds, includeRoot)); return termIds; } private  TermIds(); static Set<TermId> augmentWithAncestors(
    Ontology ontology, Set<TermId> termIds, boolean includeRoot);  }
@Test public void augmentWithAncestorsIncludeRoot() { assertEquals( ImmutableSet.of( TermId.of("HP:0000001"), TermId.of("HP:0000002"), TermId.of("HP:0000003"), TermId.of("HP:0000004"), TermId.of("HP:0000005") ), TermIds.augmentWithAncestors(ontology, Sets.newHashSet(id1), true)); }
@Test public void augmentWithAncestorsExcludeRoot() { assertEquals(TermId.of("HP:0000005"), ontology.getRootTermId()); assertEquals( ImmutableSet.of( TermId.of("HP:0000001"), TermId.of("HP:0000002"), TermId.of("HP:0000003"), TermId.of("HP:0000004") ), TermIds.augmentWithAncestors(ontology, Sets.newHashSet(id1), false)); }