void (@Nullable Consumer<? super AbstractInplaceIntroducer> pass) { String name = getTestName(true); configureByFile(getBasePath() + name + getExtension()); final boolean enabled = getEditor().getSettings().isVariableInplaceRenameEnabled(); try { TemplateManagerImpl.setTemplateTesting(getTestRootDisposable()); getEditor().getSettings().setVariableInplaceRenameEnabled(true); AbstractInplaceIntroducer introducer = invokeRefactoring(); if (pass != null) { pass.accept(introducer); } TemplateState state = TemplateManagerImpl.getTemplateState(getEditor()); assert state != null; state.gotoEnd(true); UIUtil.dispatchAllInvocationEvents(); checkResultByFile(getBasePath() + name + "_after" + getExtension()); } finally { getEditor().getSettings().setVariableInplaceRenameEnabled(enabled); } }