void () { TestDialogManager.setTestDialog(TestDialog.DEFAULT); // throw an exception if there's a need to request confirmation from user executeTransparentlyInWriteAction(() -> CommandProcessor.getInstance() .executeCommand(myProject, () -> typeInChar(' '), "", null, UndoConfirmationPolicy.REQUEST_CONFIRMATION)); undo(getFirstEditor()); checkEditorText("test"); }