// create pages that should be counted
testEngine.saveText( "TestPage03", "this is test page 03 [{PageViewPlugin}]" );
testEngine.saveText( "TestPage04", "this is test page 04 [{PageViewPlugin}]" );
WikiPage page1 = testEngine.getPage( "TestPage01" );
WikiContext context1 = new WikiContext( testEngine, page1 );
WikiPage page2 = testEngine.getPage( "TestPage02" );
WikiContext context2 = new WikiContext( testEngine, page2 );
WikiPage page3 = testEngine.getPage( "TestPage03" );
WikiContext context3 = new WikiContext( testEngine, page3 );
WikiPage page4 = testEngine.getPage( "TestPage04" );
WikiContext context4 = new WikiContext( testEngine, page4 );
// generate counts:
testEngine.getHTML( context1, page1 );
testEngine.getHTML( context2, page2 );
testEngine.getHTML( context2, page2 );
testEngine.getHTML( context3, page3 );
testEngine.getHTML( context4, page4 );
// mind the double \n in the following string:
String pageViewPageContent = "[{PageViewPlugin show='list' entries=3'\n\n* {1} ({2} views)\n}]";
testEngine.saveText( "PageViews", pageViewPageContent );
WikiPage pageviews = testEngine.getPage( "PageViews" );
WikiContext contextPV = new WikiContext( testEngine, pageviews );
String result = testEngine.getHTML( contextPV, pageviews );
// System.out.println( result );
assertTrue( result.contains( "Test Page 03" ) );