void () { configureByFile(); TemplateManagerImpl.setTemplateTesting(getTestRootDisposable()); EditorTestUtil.testUndoInEditor(getEditor(), () -> { PsiElement element = getTargetElement(); assertInPlaceRenameAllowedFor(element); new VariableInplaceRenameHandler().doRename(element, getEditor(), DataManager.getInstance().getDataContext(getEditor().getComponent())); executeAction(IdeActions.ACTION_EDITOR_DELETE_TO_WORD_END); executeAction(IdeActions.ACTION_EDITOR_DELETE_TO_WORD_END); executeAction(IdeActions.ACTION_UNDO); }); checkResultByFile(); }