### Question:
ApplicationPageDataStore extends CommonDatastore<ApplicationPageItem, ApplicationPage> implements DatastoreHasAdd<ApplicationPageItem>,
DatastoreHasGet<ApplicationPageItem>, DatastoreHasSearch<ApplicationPageItem>, DatastoreHasDelete { @Override public ApplicationPageItem get(final APIID id) { try { final ApplicationPage applicationPage = applicationAPI.getApplicationPage(id.toLong()); return converter.toApplicationPageItem(applicationPage); } catch (final Exception e) { throw new APIException(e); } } ApplicationPageDataStore(final APISession engineSession, final ApplicationAPI applicationAPI, final PageAPI pageAPI,
            final ApplicationPageItemConverter converter); @Override ApplicationPageItem add(final ApplicationPageItem item); @Override ApplicationPageItem get(final APIID id); @Override void delete(final List<APIID> ids); @Override ItemSearchResult<ApplicationPageItem> search(final int page, final int resultsByPage, final String search, final String orders,
            final Map<String, String> filters);  }### Answer:
@Test public void should_return_the_applicationPage_supplied_by_the_engine_converted_to_item_on_get() throws Exception { final ApplicationPage applicationPage = mock(ApplicationPage.class); final ApplicationPageItem item = mock(ApplicationPageItem.class); given(applicationAPI.getApplicationPage(1)).willReturn(applicationPage); given(converter.toApplicationPageItem(applicationPage)).willReturn(item); final ApplicationPageItem retrivedItem = dataStore.get(APIID.makeAPIID("1")); assertThat(retrivedItem).isNotNull(); assertThat(retrivedItem).isEqualTo(item); }
@Test(expected = APIException.class) public void should_throw_APIException_when_the_engine_throw_NotFoundException_on_get() throws Exception { given(applicationAPI.getApplicationPage(1)).willThrow(new ApplicationPageNotFoundException("")); dataStore.get(APIID.makeAPIID("1")); }