void (PsiElement target) { PsiReference ref1 = assertOneElement(searchReferences(target)); SmartPsiElementPointer<PsiElement> pRef = PointersKt.createSmartPointer(ref1.getElement()); SmartPsiElementPointer<PsiElement> pTarget = PointersKt.createSmartPointer(target); myCompilerTester.rebuild(); PsiReference ref2 = assertOneElement(searchReferences(pTarget.getElement())); assertEquals(pRef.getElement(), ref2.getElement()); }