public boolean equals(Object o) {
        if (!(o instanceof DocumentResponse)) {
            return false;
        }

        DocumentResponse docResp = (DocumentResponse) o;

        return super.equals(docResp) && ((document == null && docResp.document == null) ||
                (document != null && docResp.document != null && document.equals(docResp.document)));
    }
Returns the document of this response, or null if there is none

@return the Document, or null
documentapi/src/main/java/com/yahoo/documentapi/DocumentResponse.java