### Question:
DefaultPageManager implements PageManager { @Override public boolean wikiPageExists( final String page ) { if( m_engine.getManager( CommandResolver.class ).getSpecialPageReference( page ) != null ) { return true; } Attachment att = null; try { if( m_engine.getFinalPageName( page ) != null ) { return true; } att = m_engine.getManager( AttachmentManager.class ).getAttachmentInfo( null, page ); } catch( final ProviderException e ) { LOG.debug( "pageExists() failed to find attachments", e ); } return att != null; } 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 testNonExistentPage() { Assertions.assertFalse( engine.getManager( PageManager.class ).wikiPageExists( NAME1 ), "Page already exists" ); }
@Test public void testNonExistentPage2() throws Exception { final Page page = Wiki.contents().page( engine, NAME1 ); Assertions.assertFalse( engine.getManager( PageManager.class ).wikiPageExists( page ), "Page already exists" ); }