function assertHandlerInvoked(handlerName, var_args) {
  const handler =
      firebaseui.auth.widget.handlers_[handlerName];
  // Assert expected handler called.
  assertEquals(
      1,
      handler.getCallCount());
  // Assert expected parameters used for handler.
  for (let i = 0; i < arguments.length - 1; i++) {
    assertEquals(
      arguments[i + 1],
      handler.getLastCall().getArgument(i));
  }
}
Asserts correct handler with correct parameter called.
@param {!HandlerName} handlerName The handler name
    called.
@param {...*} var_args Additional arguments to assert, relevant to handler.