void (File ioDir) { try { globalUndo(); } catch (Exception ex) { fail("Unexpected exception: " + ex.getLocalizedMessage()); } assertTrue(new File(ioDir, "file.txt").exists()); assertNull(myDir.findChild(NEW_NAME)); }