ctx = ( InitialLdapContext ) initial.lookup( "uid=admin" );
initial.lookup( "uid=admin" );
    public void test4BuildDbNoPassNoPrincAuthNone() throws Exception    {        // clean out the database        tearDown();        Hashtable env = new Hashtable( configuration.toJndiEnvironment() );        env.put( Context.SECURITY_AUTHENTICATION, "none" );                configuration.setAllowAnonymousAccess( false );        try        {            setSysRoot( env );            fail( "should not get here due to exception" );        }        catch( LdapNoPermissionException e )        {        }        tearDown();        // ok this should start up the system now as admin        env = new Hashtable( configuration.toJndiEnvironment() );        env.put( Context.SECURITY_AUTHENTICATION, "none" );        configuration.setAllowAnonymousAccess( true );        InitialLdapContext ctx = ( InitialLdapContext ) setSysRoot( env );        assertNotNull( ctx );        // now go in as anonymous user and we should be wh        env.put( Context.PROVIDER_URL, "ou=system" );        env.put( Context.INITIAL_CONTEXT_FACTORY, "org.apache.ldap.server.jndi.CoreContextFactory" );        InitialLdapContext initial = new InitialLdapContext( env, null );        try        {            ctx = ( InitialLdapContext ) initial.lookup( "uid=admin" );            fail( "should not get here due to exception cuz anonymous user is "                    + "not allowed read access to the admin account entry" );        }        catch( LdapConfigurationException e )        {        }        catch( LdapNoPermissionException e )        {        }    }