public void exitCalled(int status) {
exitCalled = true;
}
}
MyExitCallHook exitCallHook = new MyExitCallHook();
NoExitSecurityManagerInstaller noExitSecurityManagerInstaller = NoExitSecurityManagerInstaller.installNoExitSecurityManager(exitCallHook);
try {
window.menuItemWithPath("File", "Quit").click();
} finally {
noExitSecurityManagerInstaller.uninstall();
}
assertTrue(exitCallHook.exitCalled);
}