public static boolean equalsIncludingName(final DocRef docRef1, final DocRef docRef2) {
        if (docRef1 == docRef2) {
            return true;
        } else if (docRef1 == null) {
            return false;
        } else if (docRef2 == null) {
            return false;
        } else {
            return Objects.equals(docRef1.type, docRef2.type) &&
                   Objects.equals(docRef1.uuid, docRef2.uuid) &&
                   Objects.equals(docRef1.name, docRef2.name);
        }
    }
Compare two {@link DocRef} objects on type, uuid and name, unlike the {@link DocRef#equals(Object)}
which only compares on type and uuid. This method is useful for determining if the name has changed
as well as the key parts.
stroom-docref/src/main/java/stroom/docref/DocRef.java