void () { MyTestInjector testInjector = new MyTestInjector(getPsiManager()); testInjector.injectAll(getTestRootDisposable()); @Language("JAVA") String text = """ class Foo { public static void a(boolean b, String c) { @SuppressWarnings("SillyAssignment") String java = "class A {{int i = 0; i = i;}}"; } }"""; configureByText( JavaFileType.INSTANCE, text); enableInspectionTool(new SillyAssignmentInspection()); getEditor().getCaretModel().moveToOffset(getFile().getText().indexOf("illyAssignment")); assertEmpty(doHighlighting(HighlightSeverity.ERROR)); ctrlShiftF7(); assertRangeText("i"); }