void () { PsiClass psiClass = myFixture.addClass(""" @lombok.AllArgsConstructor(staticName="of", access = AccessLevel.PUBLIC) class MyBean { String property; }"""); PsiMethod factory = ContainerUtil.find(psiClass.getMethods(), psiMethod -> psiMethod.getName().equals("of")); assertNotNull(factory); PsiParameter parameter = assertOneElement(factory.getParameterList().getParameters()); PsiElement navigationElement = parameter.getNavigationElement(); PsiField field = assertInstanceOf(navigationElement, PsiField.class); assertEquals("MyBean.java", field.getContainingFile().getVirtualFile().getName()); assertEquals("property", field.getName()); }