### Question:
CachingProvider implements PageProvider { public PageProvider getRealProvider() { return m_provider; }  @Override void initialize( final Engine engine, final Properties properties ); @Override boolean pageExists( final String pageName, final int version ); @Override boolean pageExists( final String pageName ); @Override String getPageText( final String pageName, final int version ); @Override void putPageText( final Page page, final String text ); @Override Collection< Page > getAllPages(); @Override Collection< Page > getAllChangedSince( final Date date ); @Override int getPageCount(); @Override Collection< SearchResult > findPages( final QueryItem[] query ); @Override Page getPageInfo( final String pageName, final int version ); @SuppressWarnings("unchecked") @Override List< Page > getVersionHistory( final String pageName); @Override synchronized String getProviderInfo(); @Override void deleteVersion( final String pageName, final int version ); @Override void deletePage( final String pageName ); @Override void movePage( final String from, final String to ); PageProvider getRealProvider(); static final String CACHE_NAME; static final String TEXTCACHE_NAME; static final String HISTORYCACHE_NAME; static final int DEFAULT_CACHECAPACITY; static final int DEFAULT_CACHETIMETOLIVESECONDS; static final int DEFAULT_CACHETIMETOIDLESECONDS; }### Answer:
@Test public void testInitialization() throws Exception { final Properties props = TestEngine.getTestProperties(); props.setProperty( "jspwiki.usePageCache", "true" ); props.setProperty( "jspwiki.pageProvider", "org.apache.wiki.providers.CounterProvider" ); props.setProperty( "jspwiki.cachingProvider.capacity", "100" ); final TestEngine engine = new TestEngine( props ); final CounterProvider p = (CounterProvider)((CachingProvider)engine.getManager( PageManager.class ).getProvider()).getRealProvider(); Assertions.assertEquals( 1, p.m_initCalls, "init" ); Assertions.assertEquals( 1, p.m_getAllPagesCalls, "getAllPages" ); Assertions.assertEquals( 0, p.m_pageExistsCalls, "pageExists" ); Assertions.assertEquals( 4, p.m_getPageTextCalls, "getPageText" ); engine.getManager( PageManager.class ).getPage( "Foo" ); Assertions.assertEquals( 0, p.m_pageExistsCalls, "pageExists2" ); }