function createAndShow(
    document = undefined, openInNewWindow = undefined, noFollow = undefined,
    opt_focusTextToDisplayOnOpenIfEmpty) {
  /** @suppress {checkTypes} suppression added to enable type checking */
  dialog = new LinkDialog(new DomHelper(document), mockLink);
  if (openInNewWindow) {
    dialog.showOpenLinkInNewWindow(false);
  }
  if (noFollow) {
    dialog.showRelNoFollow();
  }
  if (opt_focusTextToDisplayOnOpenIfEmpty) {
    dialog.focusTextToDisplayOnOpenIfEmpty();
  }
  dialog.addEventListener(AbstractDialog.EventType.OK, mockOkHandler);
  dialog.show();
}
Creates and shows the dialog to be tested.
@param {Document=} document Document to render the dialog into. Defaults to
    the main window's document.
@param {boolean=} openInNewWindow Whether the open in new window checkbox
    should be shown.
@param {boolean=} noFollow Whether rel=nofollow checkbox should be shown.
@param {boolean=} opt_focusTextToDisplayOnOpenIfEmpty If passed, will call
    focusTextToDisplayOnOpenIfEmpty on the dialog.
@suppress {checkTypes} suppression added to enable type checking