void () { String name = getTestName(false); addLibrary(name + ".jar", name + "-sources.jar"); Project project = myFixture.getProject(); PsiClass aClass = JavaPsiFacade.getInstance(project).findClass("a.Pair", GlobalSearchScope.allScope(project)); assertNotNull(aClass); PsiFile containingFile = aClass.getContainingFile(); PsiElement navigationElement = containingFile.getNavigationElement(); assertInstanceOf(navigationElement, PsiFileImpl.class); myFixture.openFileInEditor(((PsiFile)navigationElement).getVirtualFile()); myFixture.checkHighlighting(); }