void () { PsiManager manager = getPsiManager(); GlobalSearchScope scope = GlobalSearchScope.allScope(getProject()); PsiType leastUpperBound = GenericsUtil.getLeastUpperBound( PsiTypes.intType().getBoxedType(manager, scope), PsiTypes.longType().getBoxedType(manager, scope), manager); assertNotNull(leastUpperBound); assertEquals("Number & Comparable<? extends Number & Comparable<?>>", leastUpperBound.getPresentableText()); }