public void addAll(DocumentUpdate update) {
        if (update == null) {
            return;
        }
        if (!docId.equals(update.docId)) {
            throw new IllegalArgumentException("Expected " + docId + ", got " + update.docId + ".");
        }
        if (!documentType.equals(update.documentType)) {
            throw new IllegalArgumentException("Expected " + documentType + ", got " + update.documentType + ".");
        }
        addFieldUpdates(update.fieldUpdates());
        for (FieldPathUpdate pathUpd : update.fieldPathUpdates) {
            addFieldPathUpdate(pathUpd);
        }
    }
Adds all the field- and field path updates of the given document update to this. If the given update refers to a
different document or document type than this, this method throws an exception.

@param update The update whose content to add to this.
@throws IllegalArgumentException If the {@link DocumentId} or {@link DocumentType} of the given DocumentUpdate
                                 does not match the content of this.
document/src/main/java/com/yahoo/document/DocumentUpdate.java