### Question:
DefaultPageManager implements PageManager { @Override public void deleteVersion( final Page page ) throws ProviderException { if( page instanceof Attachment ) { m_engine.getManager( AttachmentManager.class ).deleteVersion( ( Attachment )page ); } else { m_provider.deleteVersion( page.getName(), page.getVersion() ); } } DefaultPageManager(final Engine engine, final Properties props); @Override PageProvider getProvider(); @Override Collection< Page > getAllPages(); @Override String getPageText( final String pageName, final int version ); @Override String getPureText( final String page, final int version ); @Override String getText( final String page, final int version ); @Override void saveText( final Context context, final String text ); @Override void putPageText( final Page page, final String content ); @Override PageLock lockPage( final Page page, final String user ); @Override void unlockPage( final PageLock lock ); @Override PageLock getCurrentLock( final Page page ); @Override List< PageLock > getActiveLocks(); @Override Page getPage( final String pagereq ); @Override Page getPage( final String pagereq, final int version ); @Override Page getPageInfo( final String pageName, final int version); @Override @SuppressWarnings( "unchecked" ) List< T > getVersionHistory( final String pageName ); @Override String getCurrentProvider(); @Override String getProviderDescription(); @Override int getTotalPageCount(); @Override Set< Page > getRecentChanges(); @Override boolean pageExists( final String pageName ); @Override boolean pageExists( final String pageName, final int version ); @Override boolean wikiPageExists( final String page ); @Override boolean wikiPageExists( final String page, final int version ); @Override void deleteVersion( final Page page ); @Override void deletePage( final String pageName ); @Override void deletePage( final Page page ); @Override void actionPerformed( final WikiEvent event ); @Override PageSorter getPageSorter();  }### Answer:
@Test public void testDeleteVersion() throws Exception { final Properties props = engine.getWikiProperties(); props.setProperty( "jspwiki.pageProvider", "VersioningFileProvider" ); final TestEngine engine = new TestEngine( props ); engine.saveText( NAME1, "Test1" ); engine.saveText( NAME1, "Test2" ); engine.saveText( NAME1, "Test3" ); final Page page = engine.getManager( PageManager.class ).getPage( NAME1, 3 ); engine.getManager( PageManager.class ).deleteVersion( page ); Assertions.assertNull( engine.getManager( PageManager.class ).getPage( NAME1, 3 ), "got page" ); final String content = engine.getManager( PageManager.class ).getText( NAME1, WikiProvider.LATEST_VERSION ); Assertions.assertEquals( "Test2", content.trim(), "content" ); }