code: function () {
  
    function Model(properties) {
      var self = this;
  
      if(properties) {
        Object.keys(properties).forEach(function (key) {
          self[key] = properties[key];
        });
      }
      this.save = sinon.stub();
      this.increment = sinon.stub();
      this.remove = sinon.stub();
      mongoose.emit('document', this);
    }
  
    Model.statics = {};
    Model.methods = {};
    Model.static = sinon.stub();
    Model.method = sinon.stub();
    Model.pre = sinon.stub();
  
    Model.path = function() {
      return {
        validate: sinon.stub(),
      };
    };
  
    Model.virtual = function() {
      function SetterGetter() {
        return {
          set: function() {
            return new SetterGetter();
          },
          get: function() {
            return new SetterGetter();
          }
        };
      }
      return new SetterGetter();
    };
  
    Model.aggregate = sinon.stub();
    Model.count = sinon.stub();
    Model.create = sinon.stub();
    Model.distinct = sinon.stub();
    Model.ensureIndexes = sinon.stub();
    Model.find = sinon.stub();
    Model.findById = sinon.stub();
    Model.findByIdAndRemove = sinon.stub();
    Model.findByIdAndUpdate = sinon.stub();
    Model.findOne = sinon.stub();
    Model.findOneAndRemove = sinon.stub();
    Model.findOneAndUpdate = sinon.stub();
    Model.geoNear = sinon.stub();
    Model.geoSearch = sinon.stub();
    Model.index = sinon.stub();
    Model.mapReduce = sinon.stub();
    Model.plugin = sinon.stub();
    Model.populate = sinon.stub();
    Model.remove = sinon.stub();
    Model.set = sinon.stub();
    Model.update = sinon.stub();
    Model.where = sinon.stub();
  
    mongoose.emit('model', Model);
    return Model;
  }
docs: jshint ignore:line ## Schema