@Test void suggestionsForIdentifiersAreSentToTheRightSuggester() { subject.fetchIdentifiers(randomAlphanumeric(3), ""); verify(suggesterDaoMock).fetchBioentityIdentifiers(anyString(), anyInt(), eq(null)); }
public Stream<Map<String, String>> fetchIdentifiers(String query, String... species) { Species[] speciesArray = Arrays.stream(species).map(speciesFactory::create).toArray(Species[]::new); return suggesterDao.fetchBioentityIdentifiers(query, DEFAULT_MAX_NUMBER_OF_SUGGESTIONS, speciesArray) .map(SUGGESTION_TO_MAP); }
SuggesterService { public Stream<Map<String, String>> fetchIdentifiers(String query, String... species) { Species[] speciesArray = Arrays.stream(species).map(speciesFactory::create).toArray(Species[]::new); return suggesterDao.fetchBioentityIdentifiers(query, DEFAULT_MAX_NUMBER_OF_SUGGESTIONS, speciesArray) .map(SUGGESTION_TO_MAP); } }
SuggesterService { public Stream<Map<String, String>> fetchIdentifiers(String query, String... species) { Species[] speciesArray = Arrays.stream(species).map(speciesFactory::create).toArray(Species[]::new); return suggesterDao.fetchBioentityIdentifiers(query, DEFAULT_MAX_NUMBER_OF_SUGGESTIONS, speciesArray) .map(SUGGESTION_TO_MAP); } SuggesterService(SuggesterDao suggesterDao, SpeciesFactory speciesFactory); }
SuggesterService { public Stream<Map<String, String>> fetchIdentifiers(String query, String... species) { Species[] speciesArray = Arrays.stream(species).map(speciesFactory::create).toArray(Species[]::new); return suggesterDao.fetchBioentityIdentifiers(query, DEFAULT_MAX_NUMBER_OF_SUGGESTIONS, 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); }
SuggesterService { public Stream<Map<String, String>> fetchIdentifiers(String query, String... species) { Species[] speciesArray = Arrays.stream(species).map(speciesFactory::create).toArray(Species[]::new); return suggesterDao.fetchBioentityIdentifiers(query, DEFAULT_MAX_NUMBER_OF_SUGGESTIONS, 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; }