void (String filePath, String targetFilePath) { myFixture.configureByFile(filePath); PsiReference reference = myFixture.getFile().findReferenceAt(myFixture.getCaretOffset()); PsiElement targetElement = reference.resolve(); assertNotNull(targetElement); assertEquals(targetFilePath, targetElement.getContainingFile().getVirtualFile().getName()); }