@Test
public void testGetInitialContext() throws Exception {

    final int port = Integer.parseInt(System.getProperty("ejbd.port", "4201"));
    final JNDIContext jndiContext = new JNDIContext();
    final Hashtable<String, String> env = new Hashtable<String, String>();
    assertEquals(jndiContext, "ejbd://localhost:" + port);
    assertEquals(jndiContext, "http://localhost");
    assertEquals(jndiContext, "anything://localhost:" + port);
    assertEquals(jndiContext, "//localhost:" + port);
    assertEquals(jndiContext, "localhost", "ejbd://localhost:" + port);
    assertEquals(jndiContext, "localhost:" + port, "ejbd://localhost:" + port);
    assertEquals(jndiContext, "", "ejbd://localhost:" + port);
    assertEquals(jndiContext, "ejbd://127.0.0.1:" + port);
    assertEquals(jndiContext, "http://127.0.0.1");
    assertEquals(jndiContext, "anything://127.0.0.1:" + port);
    assertEquals(jndiContext, "//127.0.0.1:" + port);
    assertEquals(jndiContext, "127.0.0.1", "ejbd://127.0.0.1:" + port);
    assertEquals(jndiContext, "127.0.0.1:" + port, "ejbd://127.0.0.1:" + port);
}