listener = listeners.get("listener2");
assertNotNull(listener);
assertTrue(listener instanceof NioListener);
assertEquals(2224, ((NioListener) listener).getPort());
DefaultCommandFactory cf = (DefaultCommandFactory) server
.getServerContext().getCommandFactory();
assertEquals(2, cf.getCommandMap().size());
assertTrue(cf.getCommand("FOO") instanceof HELP);
assertTrue(cf.getCommand("FOO2") instanceof STAT);
String[] languages = server.getServerContext().getMessageResource()
.getAvailableLanguages();
assertEquals(3, languages.length);