void () { configure(); final PsiElement elementAtCaret = myFixture.getElementAtCaret(); assertNotNull(elementAtCaret); final PsiField field = PsiTreeUtil.getParentOfType(elementAtCaret, PsiField.class, false); assertNotNull(field); final PsiClass aClass = field.getContainingClass(); assertTrue(aClass instanceof PsiAnonymousClass); final Collection<PsiReference> references = ReferencesSearch.search(field).findAll(); assertFalse(references.isEmpty()); assertEquals(1, references.size()); }