testCreateAndHide() {
    dialog = createTestDialog();
    mockCtrl.$replayAll();

    assertNotOpen('Dialog should not be open after creation', dialog);
    dialog.hide();
    assertNotOpen('Dialog should not be open after hide()', dialog);

    mockCtrl.$verifyAll();  // Verifies AFTER_HIDE was not dispatched.
  }
Tests that if you create a dialog and hide it without having shown it, no
errors occur.