init_() {
    var self = this;
    /**
     * @private {!Array<!Object>} The array of expected calls made.
     */
    this.expectedCalls_ = [];
    var assertCb = function(
        methodName, context, self, data, opt_resp, opt_error) {
      var p = new GoogPromise(function(resolve, reject) {
        self.expectedCalls_.push({
          'methodName': methodName,
          'data': data,
          'resp': opt_resp,
          'error': opt_error,
          'resolveAssert': resolve
        });
        // This API has already been called but not processed yet. Resolve
        // returned promise.
        if (self.actualCalls_[methodName] &&
            self.actualCalls_[methodName].length > 0) {
          resolve();
        }
      });
      // Returns a promise that resolves when this API is called.
      // This is useful if this API is called asynchronously.
      return p;
    };
    var cb = function(var_args) {
      var methodName = arguments[0];
      var context = arguments[1];
      var self = arguments[2];
      var data = [];
      for (var i = 3; i < arguments.length; i++) {
        data.push(arguments[i]);
      }
      // Resolve assert returned promise on the first matching API call.
      for (var i = 0; i < self.expectedCalls_.length; i++) {
        if (self.expectedCalls_[i]['methodName'] === methodName) {
          self.expectedCalls_[i]['resolveAssert']();
          break;
        }
      }
      var p = new GoogPromise(function(resolve, reject) {
        self.actualCalls_[methodName].push({
          'data': data,
          'resolve': resolve,
          'reject': reject,
          'context': context
        });
      }).thenCatch(function(e) {
        // If cancelled, remove from actual calls.
        if (e && e.name == 'cancel') {
          // Do not count this anymore.
          self.actualCalls_[methodName].shift();
        }
        throw e;
      });
      var index = self.actualCalls_[methodName].length - 1;
      self.actualCalls_[methodName][index]['promise'] = p;
      return p;
    };
    for (var key in this.asyncMethods) {
      var methodName = this.asyncMethods[key]['name'];
      var context = this.asyncMethods[key]['context'];
      this.actualCalls_[methodName] = [];
      context[methodName] = goog.partial(cb, methodName, context, self);
      var assertMethodName = 'assert' + MockHelper.capitalize_(methodName);
      context[assertMethodName] =
          goog.partial(assertCb, methodName, context, self);
    }
  }
Initializes the API listeners and creates all the simulation methods and
their recorders. In addition, creates all the methods to assert and
simulate their responses.
@private