### Question:
SearchProfileEntriesHelper implements DatastoreHasSearch<ProfileEntryItem> { @Override public ItemSearchResult<ProfileEntryItem> search(int page, int resultsByPage, String search, String orders, Map<String, String> filters) { SearchOptionsCreator options = makeSearchOptions(page, resultsByPage, search, orders, filters); SearchResult<ProfileEntry> profileEntries = profileEntryClient.searchProfiles(options.create()); return new ItemSearchResultConverter<ProfileEntryItem, ProfileEntry>(page, resultsByPage, profileEntries, new ProfileEntryItemConverter()).toItemSearchResult(); } SearchProfileEntriesHelper(ProfileEntryEngineClient profileEntryClient); @Override ItemSearchResult<ProfileEntryItem> search(int page, int resultsByPage, String search, String orders, Map<String, String> filters);  }### Answer:
@Test public void testWeCanSearchProfiles() throws Exception { SearchResult<ProfileEntry> aKnownSearchResult = SearchUtils.createEngineSearchResult(aKnownProfileEntry(), anotherKnownProfileEntry()); List<ProfileEntryItem> expectedProfileEntryItems = new ProfileEntryItemConverter().convert(aKnownSearchResult.getResult()); when(profileEntryClient.searchProfiles(any(SearchOptions.class))).thenReturn(aKnownSearchResult); ItemSearchResult<ProfileEntryItem> searchResult = searchProfileEntriesHelper.search(0, 10, null, null, null); assertTrue(SearchUtils.areEquals(expectedProfileEntryItems, searchResult.getResults())); }