try {
WindowMonitor.getInstance().addTopLevelWindowListener(listener);
assertEquals("should be nothing up", toSet(new Object[] {}), hashWindows);
dialog1.show();
assertEquals("dialog1 should have been shown", toSet(new Object[] { dialog1 }), hashWindows);
dialog2.show();
// new Snooze(500);
assertEquals("dialog2 should have been shown", toSet(new Object[] { dialog1, dialog2 }), hashWindows);
dialog1.dispose();
dialog2.dispose();
AWTSync.sync();