file.read( entry1Data );
String ldif = Strings.utf8ToString(entry1Data);
LdifEntry ldifEntry = reader.parseLdif( ldif ).get( 0 );
assertEquals( entry1, new DefaultEntry( schemaManager, ldifEntry.getEntry() ) );
//"description: desc of entry1\n"
modOpCtx = new ModifyOperationContext( mockSession );
modOpCtx.setEntry( new ClonedServerEntry( entry1 ) );
modOpCtx.setDn( entry1.getDn() );
modItems = new ArrayList<Modification>();
attribute = new DefaultAttribute( schemaManager.lookupAttributeTypeRegistry( "description" ) );
attribute.add( "desc of entry1" ); // reversed "this is description"
mod = new DefaultModification();
mod.setOperation( ModificationOperation.REMOVE_ATTRIBUTE );
mod.setAttribute( attribute );
modItems.add( mod );
modOpCtx.setModItems( modItems );
partition.modify( modOpCtx );
file.seek( ctxEntryLen );
entry1Len = getEntryLdifLen( entry1 );
entry1Data = new byte[( int ) entry1Len];
file.read( entry1Data );
ldif = Strings.utf8ToString(entry1Data);
ldifEntry = reader.parseLdif( ldif ).get( 0 );
assertEquals( entry1, new DefaultEntry( schemaManager, ldifEntry.getEntry() ) );
partition = reloadPartition();
assertExists( partition, contextEntry );
assertExists( partition, entry1 );
assertExists( partition, entry2 );