SuggesterService { public Stream<Map<String, String>> fetchPropertiesWithoutHighlighting(String query, String... species) { Species[] speciesArray = Arrays.stream(species).map(speciesFactory::create).toArray(Species[]::new); return suggesterDao.fetchBioentityProperties(query, DEFAULT_MAX_NUMBER_OF_SUGGESTIONS, false, speciesArray) .map(SUGGESTION_TO_MAP); } SuggesterService(SuggesterDao suggesterDao, SpeciesFactory speciesFactory); Stream<Map<String, String>> fetchPropertiesWithoutHighlighting(String query, String...  species); Stream<Map<String, String>> fetchPropertiesWithHighlighting(String query, String...  species); Stream<Map<String, String>> fetchIdentifiers(String query, String...  species); static final int DEFAULT_MAX_NUMBER_OF_SUGGESTIONS; }
@Test void suggestionsWithoutHighlightingAreSentToTheRightSuggester() { subject.fetchPropertiesWithoutHighlighting(randomAlphanumeric(3), ""); verify(suggesterDaoMock).fetchBioentityProperties(anyString(), anyInt(), eq(false), eq(null)); }