testProcessOkAndClose() {
    dialog = createTestDialog();
    expectOk(dialog);
    expectAfterHide(dialog);
    mockCtrl.$replayAll();

    dialog.show();
    dialog.processOkAndClose();
    assertNotOpen(
        'Dialog should not be open after processOkAndClose()', dialog);

    mockCtrl.$verifyAll();
  }
Tests that processOkAndClose() dispatches the OK event and closes the
dialog (dispatching the AFTER_HIDE event too).
@suppress {checkTypes,visibility} suppression added to enable type checking