void () { TestStateStorage stateStorage = TestStateStorage.getInstance(getProject()); String testUrl = "java:suite://Main$MainTest"; try { stateStorage.writeState(testUrl, new TestStateStorage.Record(TestStateInfo.Magnitude.FAILED_INDEX.getValue(), new Date(), 0, 0, "", "", "")); myFixture.addClass("package junit.framework; public class TestCase {}"); PsiFile file = myFixture.configureByText("MainTest.java", """ public class Main { public static class Main<caret>Test extends junit.framework.TestCase { public void testFoo() { } }}"""); RunLineMarkerContributor.Info info = new TestRunLineMarkerProvider().getInfo(file.findElementAt(myFixture.getCaretOffset())); assertNotNull(info); assertEquals(AllIcons.RunConfigurations.TestState.Red2, info.icon); } finally { stateStorage.removeState(testUrl); } }