void (boolean testHighlighting, boolean quickFixNotAvailable) { String name = getTestName(false); SameParameterValueInspection globalInspection = new SameParameterValueInspection(); globalInspection.ignoreWhenRefactoringIsComplicated = false; LocalInspectionTool inspection = globalInspection.getSharedLocalInspectionTool(); myFixture.enableInspections(inspection); myFixture.configureByFile(name + ".java"); if (testHighlighting) myFixture.testHighlighting(true, false, false); int caretOffset = myFixture.getCaretOffset(); assertTrue("No <caret> found in '" + name + ".java'", caretOffset != 0); final @NotNull List<IntentionAction> intentions = myFixture.filterAvailableIntentions("Inline value"); if (quickFixNotAvailable) { assertEmpty("intention found when it should not be available", intentions); } else { assertEquals("intention not found", 1, intentions.size()); myFixture.checkPreviewAndLaunchAction(intentions.get(0)); myFixture.checkResultByFile(name + ".after.java"); } }