DefaultInitialContextFactory implements InitialContextFactory { @Override public Context getInitialContext(Hashtable<?, ?> environment) throws NamingException { return INITIAL_CONTEXT; }  @Override Context getInitialContext(Hashtable<?, ?> environment);  }
@Test void testGetInitialContext() throws Exception { DefaultInitialContextFactory factory = new DefaultInitialContextFactory(); assertNotNull(factory.getInitialContext(null)); }