void () { TestDialogManager.setTestDialog(TestDialog.DEFAULT); final StartMarkAction[] compound = new StartMarkAction[1]; start(compound); assertNotNull(compound); try { typeInText("text"); backspace(getFirstEditor()); CommandProcessor.getInstance().executeCommand(getProject(), () -> { typeInText("TT"); CommandProcessor.getInstance().markCurrentCommandAsGlobal(getProject()); }, "global command", null); } finally { finish(compound[0]); } checkEditorText("texTT"); try { undoFirstEditor(); fail("Confirmation should be requested"); } catch (Exception e) { assertEquals("Undo Typing?", e.getMessage()); assertUndoInFirstEditorIsAvailable(); } }