code: function mongooseify(obj, returnValues) {
  
          applyMethods(obj);
  
          traverse(obj, (key, value) => {
              applyMethods(value);
          });
  
          function applyMethods(value) {
              if(value && value.hasOwnProperty('_id')) {
                  value.toObject = jasmine.createSpy('toObject');
                  value.toObject.and.returnValue(JSON.parse(JSON.stringify(value)));
                  value.save = jasmine.createSpy('save');
                  value.save.and.returnValue(returnValues && returnValues.save ? returnValues.save : Promise.resolve({name : 'fooy'}));
              }
          }
      }
docs: called with every property and it's value