void () { final PsiJavaFile file = (PsiJavaFile)PsiFileFactory.getInstance(getProject()).createFileFromText("D.java", "import java.util.Map.Entry"); PsiImportStatement importStatement = file.getImportList().getImportStatements()[0]; assertTrue(!importStatement.isOnDemand()); }