void () { final @Language("JAVA") String testFileData = """ import lombok.Builder; import lombok.Data; import lombok.Singular; import java.util.List; @Data @Builder(setterPrefix = "with") public class App { private String firmPartyGfcId<caret>; @Singular private List<String> someStrValues; public static App doSomething() { return App.builder() .withFirmPartyGfcId("firm_party_gfcid") .withSomeStrValue("someValue") .withSomeStrValues(List.of("xyz")) .clearSomeStrValues() .build(); } }"""; myFixture.configureByText(JavaFileType.INSTANCE, testFileData); myFixture.renameElementAtCaret("firmPartyGfcId_NewName"); final PsiClass appBuilderClass = myFixture.findClass("App.AppBuilder"); assertEquals(1, appBuilderClass.findMethodsByName("withFirmPartyGfcId_NewName", false).length); final PsiMethod doSomethingMethod = appBuilderClass.getContainingClass().findMethodsByName("doSomething", false)[0]; assertTrue(doSomethingMethod.getBody().getText().contains("withFirmPartyGfcId_NewName(\"firm_party_gfcid\")")); }