void () { PsiClass enumClass = myJavaFacade.findClass("pack.OurEnum", GlobalSearchScope.moduleScope(myModule)); assertNotNull(enumClass); assertTrue(enumClass.isEnum()); PsiMethod[] constructors = enumClass.getConstructors(); assertEquals(2, constructors.length); PsiReference[] references0 = ReferencesSearch.search(constructors[0], GlobalSearchScope.moduleScope(myModule), false).toArray(PsiReference.EMPTY_ARRAY); assertEquals(2, references0.length); assertTrue(references0[0].getElement() instanceof PsiEnumConstant); assertTrue(references0[1].getElement() instanceof PsiEnumConstant); PsiReference[] references1 = ReferencesSearch.search(constructors[1], GlobalSearchScope.moduleScope(myModule), false).toArray(PsiReference.EMPTY_ARRAY); assertEquals(1, references1.length); assertTrue(references1[0].getElement() instanceof PsiEnumConstant); }