void (@NotNull String before, @NotNull String after, @NotNull ConflictResolutionPolicy policy, @NotNull TemplateResource template) { myFixture.configureByText("a.java", before); PsiClass clazz = findClass(); Collection<PsiMember> members = collectMembers(clazz); GenerateToStringWorker worker = buildWorker(clazz, policy); WriteCommandAction.runWriteCommandAction(myFixture.getProject(), "", "", () -> { worker.execute(members, template, policy); }, myFixture.getFile()); myFixture.checkResult(after); }