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();
assertNull("windows 1 should be closed", WindowMonitor.getInstance().getWindow(dialog1.getTitle()));
assertNull("windows 2 should be closed", WindowMonitor.getInstance().getWindow(dialog2.getTitle()));
if (hashWindows.size() != 0) {
Thread.sleep(100); // doesn't matter, we know this is a race