code: function updateObject(entityObject) {
    var mongoAdapter = this;
  
    expect(arguments).to.have.length(
      1,
      'Invalid arguments length when updating an object in a MongoAdapter ' +
      '(it has to be passed 1 argument)'
    );
  
    return new Promise(function (resolve, reject) {
      expect(entityObject).to.be.an.instanceOf(
        Entity,
        'Invalid argument "entityObject" when updating an object in a ' +
        'MongoAdapter (it has to be an Entity instance)'
      );
  
      var EntityClass = entityObject.Entity;
  
      mongoAdapter
        .getDatabase()
        .then(function (database) {
          return database
            .collection(getEntityCollectionName(EntityClass))
            .updateOne(
              {_id: entityObject.id},
              {$set: objectToDocument(entityObject, true)}
            );
        })
        .then(function (result) {
          expect(result.matchedCount).to.equal(
            1,
            'Invalid result.matchedCount return of collection.updateOne ' +
            'in MongoDB driver when inserting an Object (it should be 1)'
          );
  
          resolve();
        })
        .catch(reject);
    });
  }
docs: Updates an Entity instance, changing on DB.
  @name module:back4app-entity-mongodb.MongoAdapter#updateObject
  @function
  @param {!module:module:back4app-entity/models/Entity} entityObject
  Entity instance being updates, to modify on DB.
  @returns {Promise.<undefined|Error>} Promise that returns nothing if succeed
  and the Error if failed.
  @example
  entity.adapter.updateObject(entity)
  .then(function () {
  entity.isNew = false;
  entity.clean();
  });