You can suspend a Java application (e.g. a JUnit execution) with a modal dialog. The most convenient way is to use the following one-liner:
javax.swing.JOptionPane.showConfirmDialog(null, "Something happened:…");
This trick will usually cause on the application server the following exception:
java.awt.HeadlessException, but works perfectly in unit, integration tests on the client side etc.
Hint: setting a breakpoint may be even faster :-)
Web Apps, SPA, PWA with vanilla Java Script (ES 6+), CSS 3 and WebStandards only. As simple as possible, but not simpler. See you at: (Progressive) Web apps, Single Page Apps and WebStandards airhacks workshops at MUC airport, Winter Edition
airhacks.fm the podcast:
Stay in touch: airhacks.news.