Project extends _Project { public Stream<Project> getOrderedParents() { return _addParentsToStream(Stream.builder()).build(); }  Stream<Project> getOrderedParents();  }
@Test public void testFetchProject() throws IOException { ObjectContext context = getRuntime().newContext(); final String ACUTE_PAEDS_NAME="CAVACUTEPAEDS"; Project p = ObjectSelect.query(Project.class, Project.NAME.eq(ACUTE_PAEDS_NAME)).selectOne(context); assertEquals(ACUTE_PAEDS_NAME, p.getName()); long numberProjects = ObjectSelect.query(Project.class).count().selectOne(context); assertNotEquals(0, numberProjects); HashSet<Concept> common = new HashSet<Concept>(); p.getOrderedParents().forEach(proj -> common.addAll(proj.getCommonConcepts())); Search search = Search.getInstance(); List<ResultItem> result = new Search.Request.Builder(search) .search("bronchio").onlyActive().withoutFullySpecifiedNames() .withRecursiveParent(Category.DISEASE.conceptId).build() .search(); List<ResultItem> filtered1 = SearchUtilities.filterSearchForProject(result, p, Collections.singletonList(Category.DISEASE.conceptId)); List<Long> filtered2 = filtered1.stream().map(ResultItem::getConceptId).collect(Collectors.toList()); List<Concept> filtered3 = ObjectSelect.query(Concept.class, Concept.CONCEPT_ID.in(filtered2)).select(context); filtered3.stream().forEach(c -> { assertTrue(common.contains(c)); System.out.println(c); }); }