env.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
env.setProperty("java.naming.provider.url", "localhost:" + serverPort);
env.setProperty("java.naming.factory.url.pkgs", "org.jnp.interfaces");
InitialContext ctx = new InitialContext(env);
System.out.println("Connected to jnp service");
ctx.list("");
ctx.close();
if (ClientSocketFactory.created == false)
fail("No ClientSocketFactory was created");
if (ServerSocketFactory.created == false)
fail("No ServerSocketFactory was created");