### Question:
WikiEngine implements Engine { @Override public String encodeName( final String pagename ) { try { return URLEncoder.encode( pagename, m_useUTF8 ? "UTF-8" : "ISO-8859-1" ); } catch( final UnsupportedEncodingException e ) { throw new InternalWikiException( "ISO-8859-1 not a supported encoding!?! Your platform is borked." , e); } } WikiEngine( final Properties properties ); protected  WikiEngine( final ServletContext context, final String appid, final Properties props ); static synchronized WikiEngine getInstance( final ServletConfig config ); static synchronized WikiEngine getInstance( final ServletConfig config, final Properties props ); static synchronized WikiEngine getInstance( final ServletContext context, Properties props ); @Override @SuppressWarnings( "unchecked" ) T getManager( final Class< T > manager ); @Override @SuppressWarnings( "unchecked" ) List< T > getManagers( final Class< T > manager ); @Override boolean isConfigured(); void initReferenceManager(); @Override Properties getWikiProperties(); @Override String getWorkDir(); @Override String getTemplateDir(); @Override Date getStartTime(); @Override String getBaseURL(); @Override String getGlobalRSSURL(); @Override String getInterWikiURL( final String wikiName ); @Override String getURL( final String context, String pageName, final String params ); @Override String getFrontPage(); @Override ServletContext getServletContext(); @Override Collection< String > getAllInterWikiLinks(); @Override Collection< String > getAllInlinedImagePatterns(); @Override String getSpecialPageReference( final String original ); @Override String getApplicationName(); @Override String getFinalPageName( final String page ); @Override String encodeName( final String pagename ); @Override String decodeName( final String pagerequest ); @Override Charset getContentEncoding(); @Override void shutdown(); @Deprecated TemplateManager getTemplateManager(); @Deprecated WorkflowManager getWorkflowManager(); @Deprecated ReferenceManager getReferenceManager(); @Deprecated RenderingManager getRenderingManager(); @Deprecated PluginManager getPluginManager(); @Deprecated VariableManager getVariableManager(); @Deprecated PageManager getPageManager(); @Deprecated CommandResolver getCommandResolver(); @Deprecated AttachmentManager getAttachmentManager(); @Deprecated AuthorizationManager getAuthorizationManager(); @Deprecated AuthenticationManager getAuthenticationManager(); @Deprecated FilterManager getFilterManager(); @Deprecated SearchManager getSearchManager(); @Deprecated ProgressManager getProgressManager(); @Override String getRootPath(); @Deprecated URLConstructor getURLConstructor(); @Deprecated RSSGenerator getRSSGenerator(); @Deprecated PageRenamer getPageRenamer(); @Deprecated UserManager getUserManager(); @Deprecated TasksManager getTasksManager(); @Deprecated GroupManager getGroupManager(); @Deprecated AdminBeanManager getAdminBeanManager(); @Deprecated AclManager getAclManager(); @Deprecated DifferenceManager getDifferenceManager(); @Deprecated EditorManager getEditorManager(); @Deprecated InternationalizationManager getInternationalizationManager(); @Override final synchronized void addWikiEventListener( final WikiEventListener listener ); @Override final synchronized void removeWikiEventListener( final WikiEventListener listener ); @Override void setAttribute( final String key, final Object value ); @Override @SuppressWarnings( "unchecked" ) T getAttribute( final String key ); @Override @SuppressWarnings( "unchecked" ) T removeAttribute( final String key );  }### Answer:
@Test public void testEncodeNameLatin1() { final String name = "abc\u00e5\u00e4\u00f6"; Assertions.assertEquals( "abc%E5%E4%F6", m_engine.encodeName(name) ); }
@Test public void testEncodeNameUTF8() throws Exception { final String name = "\u0041\u2262\u0391\u002E"; props.setProperty( WikiEngine.PROP_ENCODING, "UTF-8" ); final WikiEngine engine = new TestEngine( props ); Assertions.assertEquals( "A%E2%89%A2%CE%91.", engine.encodeName(name) ); }