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

    assertNotOpen('Dialog should not be open before show()', dialog);
    dialog.show();
    assertOpen('Dialog should be open after show()', dialog);
    dialog.hide();
    assertNotOpen('Dialog should not be open after hide()', dialog);

    mockCtrl.$verifyAll();  // Verifies AFTER_HIDE was dispatched.
  }
Tests that when you show and hide a dialog the flags indicating open are
correct and the AFTER_HIDE event is dispatched (and no errors happen).
@suppress {checkTypes} suppression added to enable type checking