GenerateToStringWorker (@NotNull final PsiClass clazz, @NotNull final ConflictResolutionPolicy policy) { return new GenerateToStringWorker(clazz, myFixture.getEditor(), true) { @Override protected ConflictResolutionPolicy exitsMethodDialog(TemplateResource template) { return policy; } }; }