process() {
    var self = this;
    return GoogPromise.resolve().then(function() {
      if (self.expectedCalls_.length) {
        var assertReq = self.expectedCalls_.shift();
        var methodName = assertReq['methodName'];
        var data = assertReq['data'];
        var resp = assertReq['resp'];
        var error = assertReq['error'];
        var resolveAssert = assertReq['resolveAssert'];
        var req = self.actualCalls_[methodName].shift();
        if (!req) {
          // Fail quickly when expected API request is not called.
          throw new Error('missing API request: ' + methodName);
        }
        assertArrayEquals(data, req['data']);
        var continueProcess = function() {
          if (self.expectedCalls_.length) {
            return self.process();
          }
        };
        // Resolve API promise if not already resolved.
        resolveAssert();
        if (error) {
          if (typeof error === 'function') {
            req['reject'](error());
          } else {
            req['reject'](error);
          }
        } else {
          if (typeof resp === 'function') {
            req['resolve'](resp());
          } else {
            req['resolve'](resp);
          }
        }
        return req['promise'].then(continueProcess, continueProcess);
      }
    });
  }
Processes all pending asserts.
@return {!GoogPromise}