assertTrue( entries.size() > 1 );
assertNull( entries.get( "cn=testsubentry,ou=system" ) );
// now add the control with visibility set to true where all entries
// except subentries disappear
SubentriesControl ctl = new SubentriesControl();
ctl.setVisibility( true );
sysRoot.setRequestControls( new Control[] { ctl } );
list = sysRoot.search( "", "(objectClass=*)", searchControls );
SearchResult result = ( SearchResult ) list.next();
assertFalse( list.hasMore() );
assertEquals( "cn=testsubentry,ou=system", result.getName() );