void () { PsiClass aClass = getJavaFacade().findClass(TimeUnit.class.getName()); assertTrue(aClass.isEnum()); assertSize(1, aClass.findMethodsByName("valueOf", false)); assertSize(1, aClass.findMethodsByName("values", false)); Collection<PsiClass> constants = DirectClassInheritorsSearch.search(aClass).findAll(); assertSize(7, constants); for (PsiClass constant : constants) { assertSize(0, constant.findMethodsByName("valueOf", false)); assertSize(0, constant.findMethodsByName("values", false)); } }