function createComponent(
    requireDisplayName, opt_tosCallback, opt_privacyPolicyCallback, opt_name,
    opt_displayFullTosPpMessage) {
  var component = new firebaseui.auth.ui.page.PasswordSignUp(
      requireDisplayName,
      goog.bind(
          firebaseui.auth.ui.element.FormTestHelper.prototype.onSubmit,
          formTestHelper),
      goog.bind(
          firebaseui.auth.ui.element.FormTestHelper.prototype.onLinkClick,
          formTestHelper),
      'user@example.com',
      opt_name,
      opt_tosCallback,
      opt_privacyPolicyCallback,
      opt_displayFullTosPpMessage);
  component.render(root);
  emailTestHelper.setComponent(component);
  nameTestHelper.setComponent(component);
  newPasswordTestHelper.setComponent(component);
  formTestHelper.setComponent(component);
  // Reset previous state of form helper.
  formTestHelper.resetState();
  infoBarTestHelper.setComponent(component);
  tosPpTestHelper.setComponent(component);
  // Reset previous state of tosPp helper.
  tosPpTestHelper.resetState();
  pageTestHelper.setClock(mockClock).setComponent(component);
  return component;
}
@param {boolean} requireDisplayName Whether to show the display name.
@param {?function()=} opt_tosCallback Callback to invoke when the ToS link
    is clicked.
@param {?function()=} opt_privacyPolicyCallback Callback to invoke when the
    Privacy Policy link is clicked.
@param {string=} opt_name The name to prefill.
@param {boolean=} opt_displayFullTosPpMessage Whether to display the full
    message of Term of Service and Privacy Policy.
@return {!goog.ui.Component} The rendered PhoneSignInFinish component.