assertTrue( set.contains( "ou=system" ) ); assertTrue( set.contains( "ou=groups,ou=system" ) ); assertFalse( set.contains( "cn=administrators,ou=groups,ou=system" ) ); assertTrue( set.contains( "ou=users,ou=system" ) ); assertFalse( set.contains( "uid=akarasulu,ou=users,ou=system" ) ); assertFalse( set.contains( "uid=admin,ou=system" ) );
    public void testSearchSubtreeByNonAdmin() throws NamingException    {        SearchControls controls = new SearchControls();        controls.setSearchScope( SearchControls.SUBTREE_SCOPE );        HashSet set = new HashSet();        NamingEnumeration list = sysRoot.search( "", "(objectClass=*)", controls );        while ( list.hasMore() )        {            SearchResult result = ( SearchResult ) list.next();            set.add( result.getName() );        }        assertTrue( set.contains( "ou=system" ) );        assertTrue( set.contains( "ou=groups,ou=system" ) );        assertFalse( set.contains( "cn=administrators,ou=groups,ou=system" ) );        assertTrue( set.contains( "ou=users,ou=system" ) );        assertFalse( set.contains( "uid=akarasulu,ou=users,ou=system" ) );        assertFalse( set.contains( "uid=admin,ou=system" ) );    }