void () { PsiClass psiClass = myFixture.addClass(""" @lombok.AllArgsConstructor class MyBean { String property; }"""); PsiMethod[] constructors = psiClass.getConstructors(); PsiMethod constructor = assertOneElement(constructors); PsiParameter parameter = assertOneElement(constructor.getParameterList().getParameters()); PsiElement navigationElement = parameter.getNavigationElement(); PsiField field = assertInstanceOf(navigationElement, PsiField.class); assertEquals("MyBean.java", field.getContainingFile().getVirtualFile().getName()); assertEquals("property", field.getName()); }