session.getLdapServer().getDirectoryService().getLdapCodecService() );
syncModify.setSyncStateType( SyncStateTypeEnum.MODIFY );
syncModify.setEntryUUID( Strings.uuidToBytes(alteredEntry.get(SchemaConstants.ENTRY_UUID_AT)
.getString()) );
syncModify.setCookie( getCookie( alteredEntry ) );
respEntry.addControl( syncModify );
WriteFuture future = session.getIoSession().write( respEntry );
// store altered entry cause that holds the updated CSN
handleWriteFuture( future, alteredEntry, EventType.MODIFY, null );