checkBeforeAdd( normalizedName );   entry = ( Attributes ) entry.clone(); entry.remove( Constants.ENTRY_UUID ); entry.remove( Constants.ENTRY_DELETED ); entry.put( Constants.ENTRY_UUID, uuidFactory.newInstance().toOctetString() ); entry.put( Constants.ENTRY_DELETED, "false" );     entry.put( Constants.ENTRY_CSN, csn.toOctetString() );  return new AddEntryOperation( csn, normalizedName, entry );
return newAdd( newCSN(), normalizedName, entry );
    private Operation newAdd( CSN csn, LdapDN normalizedName, Attributes entry ) throws NamingException    {        // Check an entry already exists.        checkBeforeAdd( normalizedName );        // Insert 'entryUUID' and 'entryDeleted'.        entry = ( Attributes ) entry.clone();        entry.remove( Constants.ENTRY_UUID );        entry.remove( Constants.ENTRY_DELETED );        entry.put( Constants.ENTRY_UUID, uuidFactory.newInstance().toOctetString() );        entry.put( Constants.ENTRY_DELETED, "false" );        // NOTE: We inlined addDefaultOperations() because ApacheDS currently        // creates an index entry only for ADD operation (and not for        // MODIFY operation)        entry.put( Constants.ENTRY_CSN, csn.toOctetString() );        return new AddEntryOperation( csn, normalizedName, entry );    }