@Override
    public Document get(DocumentId id, DocumentOperationParameters parameters, Duration timeout) {
        GetDocumentMessage msg = new GetDocumentMessage(id, parameters.fieldSet().orElse(DocumentOnly.NAME));

        Reply reply = syncSend(msg, timeout != null ? timeout : defaultTimeout, parameters);
        if (reply.hasErrors()) {
            throw new DocumentAccessException(MessageBusAsyncSession.getErrorMessage(reply));
        }
        if (reply.getType() != DocumentProtocol.REPLY_GETDOCUMENT) {
            throw new DocumentAccessException("Received unknown response: " + reply);
        }
        GetDocumentReply docReply = ((GetDocumentReply)reply);
        Document doc = docReply.getDocument();
        if (doc != null) {
            doc.setLastModified(docReply.getLastModified());
        }
        return doc;
    }
Perform a synchronous sending of a message. This method block until the message is successfuly sent and a
corresponding reply has been received.

@param msg The message to send.
@return The reply received.
documentapi/src/main/java/com/yahoo/documentapi/messagebus/MessageBusSyncSession.java