void () { myFixture.enableInspections(new UnusedImportInspection()); myFixture.configureByText("a.java", """ import java.ut<caret>il.Set;record\s import x java.util.Map; import java.util.Map; class Foo {}"""); myFixture.launchAction(myFixture.findSingleIntention(JavaErrorBundle.message("remove.unused.imports.quickfix.text"))); // whatever: main thing it didn't throw assertNotEmpty(myFixture.doHighlighting(HighlightSeverity.ERROR)); }