TestMapperContext mapperContext = new TestMapperContext();
mapperContext.getPageManager().touchPage(testPage);
mapperContext.getPageManager().commitRequest();
// by cleaning session cache we make sure of not being testing the same in-memory instance
mapperContext.cleanSessionCache();
PageProvider pageProvider = mapperContext.new TestPageProvider(testPage.getPageId(), 0);
// simulation an test call to isNewPageInstance
boolean isNewPageInstance = pageProvider.isNewPageInstance();