void () { PsiClass aClass = getFile("MyClass").getClasses()[0]; PsiReferenceList extList = aClass.getExtendsList(); assertNotNull(extList); PsiClassType[] refs = extList.getReferencedTypes(); assertEquals(1, refs.length); assertEquals("ArrayList", refs[0].getPresentableText()); assertEquals("java.util.ArrayList", refs[0].getCanonicalText()); PsiReferenceList implList = aClass.getImplementsList(); assertNotNull(implList); PsiClassType[] implRefs = implList.getReferencedTypes(); assertEquals(1, implRefs.length); assertEquals("Cloneable", implRefs[0].getPresentableText()); assertEquals("java.lang.Cloneable", implRefs[0].getCanonicalText()); PsiReferenceList throwsList = aClass.getMethods()[0].getThrowsList(); PsiClassType[] throwsRefs = throwsList.getReferencedTypes(); assertEquals(2, throwsRefs.length); assertEquals("Exception", throwsRefs[0].getPresentableText()); assertEquals("java.lang.Exception", throwsRefs[0].getCanonicalText()); assertEquals("IOException", throwsRefs[1].getPresentableText()); assertEquals("java.io.IOException", throwsRefs[1].getCanonicalText()); }