void (@NotNull final CodeInsightTestFixture fixture, @NotNull final String before, @NotNull final String after) { fixture.configureByFile(before); final Editor editor = fixture.getEditor(); final PsiElement element = TargetElementUtil.findTargetElement(editor, TARGET_FOR_INLINE_FLAGS); assert element instanceof PsiMethod : element; final PsiReference ref = fixture.getFile().findReferenceAt(editor.getCaretModel().getOffset()); final PsiReferenceExpression refExpr = ref instanceof PsiReferenceExpression ? (PsiReferenceExpression)ref : null; final PsiMethod method = (PsiMethod)element; assert !(InlineMethodProcessor.checkBadReturns(method) && !InlineUtil.allUsagesAreTailCalls(method)) : "Bad returns found"; new InlineMethodProcessor(fixture.getProject(), method, refExpr, editor, false).run(); fixture.checkResultByFile(after, false); }