void () { PsiPackage javaLang = JavaDirectoryService.getInstance().getPackage(OBJECT_CLASS.getContainingFile().getContainingDirectory()); ElementPresentation presentation = ElementPresentation.forElement(javaLang); assertEquals("java.lang", presentation.getQualifiedName()); assertEquals("java.lang", presentation.getName()); assertEquals("", presentation.getComment()); assertSame(ElementPresentation.Noun.PACKAGE, presentation.getKind()); PsiPackage defaultPackage = javaLang.getParentPackage().getParentPackage(); presentation = ElementPresentation.forElement(defaultPackage); assertEquals("<default>", presentation.getQualifiedName()); assertEquals("<default>", presentation.getName()); assertEquals("", presentation.getComment()); }