### Question:
ApplicationDataStore extends CommonDatastore<ApplicationItem, Application> implements DatastoreHasAdd<ApplicationItem>,
DatastoreHasUpdate<ApplicationItem>,
DatastoreHasGet<ApplicationItem>,DatastoreHasSearch<ApplicationItem>, DatastoreHasDelete { @Override public void delete(final List<APIID> ids) { try { for(final APIID id :ids){ applicationAPI.deleteApplication(id.toLong()); } } catch (final Exception e) { throw new APIException(e); } } ApplicationDataStore(final APISession engineSession, final ApplicationAPI applicationAPI, final PageAPI pageAPI, final ApplicationItemConverter converter); @Override void delete(final List<APIID> ids); @Override ApplicationItem get(final APIID id); @Override ApplicationItem add(final ApplicationItem item); @Override ApplicationItem update(final APIID id, final Map<String, String> attributes); @Override ItemSearchResult<ApplicationItem> search(final int page, final int resultsByPage, final String search, final String orders,
            final Map<String, String> filters);  }### Answer:
@Test public void should_delete_the_good_Application_on_delete() throws Exception { dataStore.delete(Arrays.<APIID>asList(APIID.makeAPIID("1"),APIID.makeAPIID("2"))); verify(applicationAPI, times(1)).deleteApplication(1); verify(applicationAPI, times(1)).deleteApplication(2); }
@Test(expected = APIException.class) public void should_throw_APIException_on_delete_when_engine_throws_exception() throws Exception { doThrow(new DeletionException("")).when(applicationAPI).deleteApplication(1); dataStore.delete(Arrays.<APIID> asList(APIID.makeAPIID("1"))); }