void () { PsiClass psiClass = myJavaFacade.findClass(JButton.class.getName(), GlobalSearchScope.allScope(myProject)); final Query<PsiReference> query = ReferencesSearch.search(psiClass); final Collection<PsiReference> result = query.findAll(); assertEquals(1, result.size()); }