protected LdapContext createLdapContext(Hashtable env) throws NamingException {
        return new InitialLdapContext(env, null);
    }
Creates and returns a new {@link javax.naming.ldap.InitialLdapContext} instance.  This method exists primarily
to support testing where a mock LdapContext can be returned instead of actually creating a connection, but
subclasses are free to provide a different implementation if necessary.

@param env the JNDI environment settings used to create the LDAP connection
@return an LdapConnection
@throws NamingException if a problem occurs creating the connection
core/src/main/java/org/apache/shiro/realm/ldap/JndiLdapContextFactory.java