void (@NotNull ActionHint actionHint, @NotNull String testFullPath, @NotNull String testName) { final LocalQuickFix fix = (LocalQuickFix)new RedundantThrowsDeclarationInspection().getQuickFix(actionHint.getExpectedText()); final int offset = getEditor().getCaretModel().getOffset(); final PsiElement psiElement = getFile().findElementAt(offset); assert psiElement != null; final ProblemDescriptor descriptor = InspectionManager.getInstance(getProject()) .createProblemDescriptor(psiElement.getParent(), "", fix, ProblemHighlightType.GENERIC_ERROR_OR_WARNING, true); fix.applyFix(getProject(), descriptor); final String expectedFilePath = getBasePath() + "/after" + testName; checkResultByFile("In file: " + expectedFilePath, expectedFilePath, false); }