code: private static BsonDocument withNewVersion(
        final BsonDocument document,
        final BsonDocument newVersion
    ) {
      final BsonDocument newDocument = BsonUtils.copyOfDocument(document);
      newDocument.put(DOCUMENT_VERSION_FIELD, newVersion);
      return newDocument;
    }
docs: Adds and returns a document with a new version to the given document.
  
  @param document   the document to attach a new version to.
  @param newVersion the version to attach to the document
  @return a document with a new version to the given document.