testExecAndDispose(reuse = undefined) {
    setUpMockRange();
    expectOpened();
    expectClosed();
    mockField.debounceEvent(Field.EventType.SELECTIONCHANGE);
    mockCtrl.$replayAll();
    if (reuse) {
      plugin.setReuseDialog(true);
    }
    assertFalse(
        'Dialog should not be open yet',
        !!plugin.getDialog() && plugin.getDialog().isOpen());

    plugin.execCommand(COMMAND);
    assertTrue(
        'Dialog should be open now',
        !!plugin.getDialog() && plugin.getDialog().isOpen());

    /** @suppress {visibility} suppression added to enable type checking */
    const tempDialog = plugin.getDialog();
    plugin.dispose();
    assertFalse(
        'Dialog should not still be open after disposal', tempDialog.isOpen());
    mockCtrl.$verifyAll();
  }
Tests the simple flow of calling execCommand (which opens the
dialog) and immediately disposing of the plugin (which closes the dialog).
@param {boolean=} reuse Whether to set the plugin to reuse its dialog.
@suppress {missingProperties,visibility} suppression added to enable type
checking