AnalyticsSearchService { public ImmutableList<String> findSpecies(SemanticQuery geneQuery, SemanticQuery conditionQuery) { return readSpecies(miscellaneousAnalyticsSearchDao.getSpecies(geneQuery, conditionQuery)); } @Inject  AnalyticsSearchService(MiscellaneousAnalyticsSearchDao miscellaneousAnalyticsSearchDao); ImmutableSet<String> fetchExperimentTypes(String bioentityIdentifier); static ImmutableSet<String> readBuckets(String response); ImmutableSet<String> fetchExperimentTypesInAnyField(SemanticQuery query); ImmutableSet<String> fetchExperimentTypes(SemanticQuery geneQuery, String speciesReferenceName); ImmutableSet<String> fetchExperimentTypes(SemanticQuery geneQuery,
                                                     SemanticQuery conditionQuery,
                                                     String speciesReferenceName); ImmutableSet<String> searchMoreThanOneBioentityIdentifier(SemanticQuery geneQuery,
                                                                     SemanticQuery conditionQuery,
                                                                     String speciesReferenceName); ImmutableSet<String> searchBioentityIdentifiers(SemanticQuery geneQuery,
                                                           SemanticQuery conditionQuery,
                                                           String speciesReferenceName); Collection<String> getBioentityIdentifiersForSpecies(String speciesReferenceName); boolean tissueExpressionAvailableFor(SemanticQuery geneQuery); ImmutableList<String> findSpecies(SemanticQuery geneQuery, SemanticQuery conditionQuery);  }
@Test public void findSpecies() { ImmutableList<String> speciesList = subject.findSpecies(ZINC_FINGER_QUERY, EMPTY_CONDITION_QUERY); assertThat(speciesList.get(0), is("homo sapiens")); assertThat(speciesList.get(speciesList.size() - 1), is("drosophila melanogaster")); assertThat(speciesList, hasSize(22)); }
@Test public void findNoSpecies() { ImmutableList<String> speciesList = subject.findSpecies(FOOBAR_GENE_QUERY, EMPTY_CONDITION_QUERY); assertThat(speciesList, is(empty())); }