void (Supplier<PsiElement> supplier) { configFile(); PsiReference reference = myFixture.getFile().findReferenceAt(myFixture.getCaretOffset()); PsiElement expectedTarget = supplier.get(); assertNotNull(expectedTarget); assertEquals(expectedTarget.getText(), reference.resolve().getText()); PsiElement targetElement = reference.resolve(); assertSame(expectedTarget, targetElement); }