function createMockConfirmationResultWithError(error) {
  return {
    'confirm': function(code) {
      assertEquals('123456', code);
      return goog.Promise.reject(error);
    }
  };
}
@param {!Object} error The expected error to throw on confirmation.
@return {!firebase.auth.ConfirmationResult} The mock confirmation result that
    throws the expected error on code confirmation.