void () { final PsiClass aClass = getJavaFacade().getElementFactory().createClassFromText("public String toString() {return null;}", null); final PsiMethod method = aClass.getMethods()[0]; final PsiMethod[] superMethods = method.findSuperMethods(); assertEquals(1, superMethods.length); assertEquals(CommonClassNames.JAVA_LANG_OBJECT, superMethods[0].getContainingClass().getQualifiedName()); }