void () { String name = getTestName(false); String fileName = "/refactoring/inlinePatternVariable/" + name + ".java"; configureByFile(fileName); PsiElement element = TargetElementUtil .findTargetElement(getEditor(), TargetElementUtil.ELEMENT_NAME_ACCEPTED | TargetElementUtil.REFERENCED_ELEMENT_ACCEPTED); new InlineLocalHandler().inlineElement(getProject(), getEditor(), element); PlatformTestUtil.dispatchAllEventsInIdeEventQueue(); NonBlockingReadActionImpl.waitForAsyncTaskCompletion(); checkResultByFile(fileName + ".after"); }