### Question:
ApplicationMenuDataStore extends CommonDatastore<ApplicationMenuItem, ApplicationMenu> implements DatastoreHasAdd<ApplicationMenuItem>,
DatastoreHasUpdate<ApplicationMenuItem>,
DatastoreHasGet<ApplicationMenuItem>, DatastoreHasSearch<ApplicationMenuItem>, DatastoreHasDelete { @Override public ItemSearchResult<ApplicationMenuItem> search(final int page, final int resultsByPage, final String search, final String orders, final Map<String, String> filters) { final SearchOptionsCreator creator = makeSearchOptionCreator(page, resultsByPage, search, orders, filters); try { final SearchResult<ApplicationMenu> searchResult = runSearch(creator); final List<ApplicationMenuItem> appMenuItems = convertEngineToConsoleItemsList(searchResult.getResult()); return new ItemSearchResult<ApplicationMenuItem>(page, resultsByPage, searchResult.getCount(), appMenuItems); } catch (final SearchException e) { throw new APIException(e); } } ApplicationMenuDataStore(final APISession engineSession, final ApplicationAPI applicationAPI, final ApplicationMenuItemConverter converter); @Override ApplicationMenuItem add(final ApplicationMenuItem item); @Override ApplicationMenuItem update(final APIID id, final Map<String, String> attributes); @Override ApplicationMenuItem get(final APIID id); @Override void delete(final List<APIID> ids); @Override ItemSearchResult<ApplicationMenuItem> search(final int page, final int resultsByPage, final String search, final String orders,
            final Map<String, String> filters);  }### Answer:
@Test(expected = APIException.class) public void should_throw_APIException_when_engine_throws_SearchException_on_search() throws Exception { final String orders = ApplicationMenuItem.ATTRIBUTE_DISPLAY_NAME + " DESC"; given(applicationAPI.searchApplicationMenus(any(SearchOptions.class))).willThrow(new SearchException(null)); dataStore.search(0, 1, null, orders, Collections.<String, String> emptyMap()); }