void () { myFixture.addClass("package foo; public class Map {}"); myFixture.configureByText("a.java", """ import java.util.HashMap; public class Foo { Ma<caret>p l = new HashMap<>(); } """); ImportClassFix intention = (ImportClassFix)IntentionActionDelegate.unwrap(myFixture.findSingleIntention("Import class")); assertTrue(ContainerUtil.exists(intention.getClassesToImport(), cls -> cls.getQualifiedName().equals( CommonClassNames.JAVA_UTIL_MAP))); }