PsiElement (String text) { myFixture.configureByText(KotlinFileType.INSTANCE, text); PsiReference ref = myFixture.getFile().findReferenceAt(myFixture.getCaretOffset()); //noinspection ConstantConditions return ref.resolve().getNavigationElement(); }