### Question:
PageResourceProviderImpl implements PageResourceProvider { @Override public Page getPage(final PageAPI pageAPI) throws PageNotFoundException { if (pageId != null) { return pageAPI.getPage(pageId); } return pageAPI.getPageByName(getPageName()); } PageResourceProviderImpl(final String pageName, final long tenantId);  PageResourceProviderImpl(final Page page, final long tenantId); private  PageResourceProviderImpl(final String pageName, final long tenantId, final Long pageId, final Long processDefinitionId); @Override InputStream getResourceAsStream(final String resourceName); @Override File getResourceAsFile(final String resourceName); @Override String getResourceURL(final String resourceName); @Override String getBonitaThemeCSSURL(); @Override File getPageDirectory(); File getTempPageFile(); void setResourceClassLoader(final ClassLoader resourceClassLoader); @Override ResourceBundle getResourceBundle(final String name, final Locale locale); @Override String getPageName(); @Override Page getPage(final PageAPI pageAPI); @Override String getFullPageName();  }### Answer:
@Test public void should_getPage_by_name() throws Exception { pageResourceProvider.getPage(pageApi); verify(pageApi).getPageByName(PAGE_NAME); }
@Test public void should_getPage_by_id() throws Exception { pageResourceProviderWithProcessDefinition.getPage(pageApi); verify(pageApi,never()).getPageByName(anyString()); verify(pageApi).getPage(PAGE_ID); }