### Question:
APIApplicationPage extends ConsoleAPI<ApplicationPageItem> implements APIHasAdd<ApplicationPageItem>, APIHasSearch<ApplicationPageItem>, APIHasGet<ApplicationPageItem>, APIHasDelete { @Override protected void fillDeploys(final ApplicationPageItem item, final List<String> deploys) { addDeployer(new PageDeployer( factory.createPageDataStore(getEngineSession()), ApplicationPageItem.ATTRIBUTE_PAGE_ID)); addDeployer(new ApplicationDeployer( factory.createApplicationDataStore(getEngineSession()), ApplicationPageItem.ATTRIBUTE_APPLICATION_ID)); super.fillDeploys(item, deploys); } APIApplicationPage(final APIApplicationDataStoreFactory factory); @Override ApplicationPageItem add(final ApplicationPageItem item); @Override String defineDefaultSearchOrder();  }### Answer:
@Test public void should_fill_application_deploy_when_requested() { final ApplicationPageItem applicationPage = new ApplicationPageItem(); applicationPage.setApplicationId(1L); final ApplicationItem application = new ApplicationItem(); application.setDisplayName("foo"); given(applicationDataStore.get(APIID.makeAPIID(1L))).willReturn(application); apiApplicationPage.fillDeploys(applicationPage, singletonList(ApplicationPageItem.ATTRIBUTE_APPLICATION_ID)); assertThat(applicationPage.getApplication()).isEqualTo(application); }
@Test public void should_fill_page_deploy_when_requested() { final ApplicationPageItem applicationPage = new ApplicationPageItem(); applicationPage.setPageId(2L); final PageItem customPage = new PageItem(); customPage.setContentName("bar"); given(pageDataStore.get(APIID.makeAPIID(2L))).willReturn(customPage); apiApplicationPage.fillDeploys(applicationPage, singletonList(ApplicationPageItem.ATTRIBUTE_PAGE_ID)); assertThat(applicationPage.getPage()).isEqualTo(customPage); }