PsiElement (final String packageName) { final PsiPackage aPackage = myFixture.getJavaFacade().findPackage(packageName); assert aPackage != null; final PsiDirectory[] directories = aPackage.getDirectories(); return directories [0]; }