entryMvrdn.put( "dc", "mvrdn" );
addCtx.setEntry( entryMvrdn );
partition.add( addCtx );
DeleteOperationContext delCtx = new DeleteOperationContext( session );
DN dn = new DN( "dc=test1,dc=test,ou=test,ou=system" );
dn.normalize( schemaManager.getNormalizerMapping() );
delCtx.setDn( dn );
partition.delete( delCtx );
assertTrue( new File( wkdir, "ou=test,ou=system" ).exists() );
assertTrue( new File( wkdir, "ou=test,ou=system.ldif" ).exists() );
assertTrue( new File( wkdir, "ou=test,ou=system/dc=test" ).exists() );
assertTrue( new File( wkdir, "ou=test,ou=system/dc=test.ldif" ).exists() );
assertFalse( new File( wkdir, "ou=test,ou=system/dc=test/dc=test1" ).exists() );
assertFalse( new File( wkdir, "ou=test,ou=system/dc=test/dc=test1.ldif" ).exists() );
assertFalse( new File( wkdir, "ou=test,ou=system/dc=test/dc=test2" ).exists() );
assertTrue( new File( wkdir, "ou=test,ou=system/dc=test/dc=test2.ldif" ).exists() );
assertFalse( new File( wkdir, "ou=test,ou=system/dc=test/dc=mvrdn+objectclass=domain" ).exists() );
assertTrue( new File( wkdir, "ou=test,ou=system/dc=test/dc=mvrdn+objectclass=domain.ldif" ).exists() );
dn = new DN( "dc=test2,dc=test,ou=test,ou=system" );
dn.normalize( schemaManager.getNormalizerMapping() );
delCtx.setDn( dn );
partition.delete( delCtx );
dn = new DN( "dc=mvrdn+objectClass=domain,dc=test,ou=test,ou=system" );
dn.normalize( schemaManager.getNormalizerMapping() );
delCtx.setDn( dn );
partition.delete( delCtx );
assertTrue( new File( wkdir, "ou=test,ou=system" ).exists() );
assertTrue( new File( wkdir, "ou=test,ou=system.ldif" ).exists() );