EventRecord rec = ( EventRecord ) listener.getEventRecords().get( 0 );
assertEquals( "objectAdded", rec.method );
assertEquals( ctx, rec.event.getSource() );
ctx.removeNamingListener( listener );
ctx.destroySubcontext( "ou=testentry" );
// Wait 1 second, as the process is asynchronous
Thread.sleep( 1000 );
assertEquals( 1, listener.getEventRecords().size() );