void () { myFixture.configureByText("Test.java", """ class X { void test(int x) { if(x > 0) { System.out.println<caret>("Positive"); } } }"""); IntentionAction action = myFixture.findSingleIntention(getMessage("if")); ModCommandAction mcAction = action.asModCommandAction(); assertNotNull(mcAction); Presentation presentation = mcAction.getPresentation(ActionContext.from(myFixture.getEditor(), myFixture.getFile())); assertNotNull(presentation); assertEquals(List.of(new Presentation.HighlightRange(TextRange.from(44, 1), EditorColors.DELETED_TEXT_ATTRIBUTES), new Presentation.HighlightRange(TextRange.from(87, 1), EditorColors.DELETED_TEXT_ATTRIBUTES)), presentation.rangesToHighlight()); }