void () { PsiJavaCodeReferenceElement ref = (PsiJavaCodeReferenceElement)configure(); PsiElement target = ref.advancedResolve(true).getElement(); assertTrue(target instanceof PsiClass); PsiElement parent = ref.getParent(); assertTrue(parent instanceof PsiAnonymousClass); ((PsiAnonymousClass)parent).getBaseClassType().resolve(); assertEquals(target, ((PsiAnonymousClass)parent).getBaseClassType().resolve()); }