void (IntroduceVariableBase testMe) { String baseName = "/refactoring/introduceVariable/" + getTestName(false); configureByFile(baseName + ".java"); testMe.invoke(getProject(), getEditor(), getFile(), null); NonBlockingReadActionImpl.waitForAsyncTaskCompletion(); TemplateState state = TemplateManagerImpl.getTemplateState(getEditor()); if (state == null) return; state.gotoEnd(false); checkResultByFile(baseName + ".after.java"); }