assertNotNull( defaultContext.lookup( "javaClassName=HelloWorld" ) );
assertNotNull( defaultContext.lookup( "fullyQualifiedJavaClassName=HelloWorld" ) );
    public void testLdapClassLoaderWithClassLoadedAtDefaultSearchSubtree() throws Exception    {        // get default naming context to work on        ServerLdapContext defaultContext = ( ServerLdapContext ) sysRoot.lookup( "ou=system" );        // create an extensible object for holding custom config data        Attributes classLoaderDefaultSearchContextConfig = new BasicAttributes();        Attribute objectClass = new BasicAttribute( "objectClass" );        objectClass.add( "top" );        objectClass.add( "extensibleObject" );        // create custom config entry        classLoaderDefaultSearchContextConfig.put( objectClass );        classLoaderDefaultSearchContextConfig.put( new BasicAttribute( "cn", "classLoaderDefaultSearchContext" ) );        // add a default search context to the configuration        classLoaderDefaultSearchContextConfig.put( new BasicAttribute( "classLoaderDefaultSearchContext", "ou=system" ) );        // add the configuration entry to the DIT        ServerLdapContext configContext = ( ServerLdapContext ) defaultContext.lookup( "ou=configuration" );        configContext.createSubcontext( "cn=classLoaderDefaultSearchContext", classLoaderDefaultSearchContextConfig );        // create a class holder entry and add it to the DIT        Attributes attributes = new BasicAttributes( "objectClass", "top", true );        attributes.get( "objectClass" ).add( "javaClass" );        attributes.put( "javaClassName", "HelloWorld" );        attributes.put( "javaClassByteCode", HELLOWORLD_CLASS_BYTES );        defaultContext.createSubcontext( "javaClassName=HelloWorld", attributes );        // assert set up successfull        assertNotNull( defaultContext.lookup( "javaClassName=HelloWorld" ) );        // load the class        LdapClassLoader loader = new LdapClassLoader( ( ServerLdapContext ) ( sysRoot.lookup( "" ) ) );        Class clazz = loader.loadClass( "HelloWorld" );        // assert class loaded successfully        assertEquals( clazz.getName(), "HelloWorld" );    }