void () { final JavaPsiFacadeEx psiManager = getJavaFacade(); final PsiElementFactory factory = psiManager.getElementFactory(); final PsiClass classCollection = psiManager.findClass("test.Collection"); final PsiClass classList = psiManager.findClass("test.List"); final PsiType collectionType = factory.createType(classCollection, PsiSubstitutor.EMPTY); final PsiType listType = factory.createType(classList, PsiSubstitutor.EMPTY); assertEquals(collectionType.getCanonicalText(), "test.Collection<E>"); assertEquals(listType.getCanonicalText(), "test.List<T>"); final PsiType typeListOfString = factory.createTypeFromText("test.List<java.lang.String>", null); final PsiType typeCollectionOfString = factory.createTypeFromText("test.Collection<java.lang.String>", null); assertTrue(typeCollectionOfString.isAssignableFrom(typeListOfString)); }