Dn dn = new Dn( schemaManager, "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co." );
AttributeType csnAt = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.ENTRY_CSN_AT );
Attribute attrib = new DefaultAttribute( csnAt );
CsnFactory csnF = new CsnFactory( 0 );
String csn = csnF.newInstance().toString();
attrib.add( csn );
Modification add = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, attrib );
String entryId = partition.getEntryId( dn );
Entry lookedup = partition.fetch( entryId );
assertNotSame( csn, lookedup.get( csnAt ).getString() );
lookedup = partition.modify( dn, add );
String updateCsn = lookedup.get( csnAt ).getString();
assertEquals( csn, updateCsn );
csn = csnF.newInstance().toString();
Entry modEntry = new DefaultEntry( schemaManager );
modEntry.add( csnAt, csn );
assertNotSame( csn, updateCsn );