title: Builder Pattern useful with Setter-methods?
body: <p>So I have a webproject with Hybris, Spring and so on. </p>
  
  <p>I have some classes, which are autogenerated. Let's say I have one modelclass, which is autogenerated and inherits from another class some methods, to set fields. </p>
  
  <p>When writing Unit-tests, is it useful to start using the Builder pattern? Because the thing is, I don't have a constructor, like Employee(int id, String name) and so on, I only have the inherited methods to set them (setId(int id) and so on).</p>
  
  <p>So when I would write a Builder class for this model for example, I would have the methods .withId(int id) and .withName(String name) and the build()-method, where I would run the setter-methods.</p>
  
  <p>so in the end in my test-class I would have:</p>
  
  <pre><code>EmployeeBuilder eb = new EmployeeBuilder();
  Employee emp = eb.withId(123)
                   .withName("John")
                   .build();
  </code></pre>
  
  <p>But since I already have Setter-Methods I normally have:</p>
  
  <pre><code>Employee emp = new Employee();
  emp.setId(123);
  emp.setName("John");
  </code></pre>
  
  <p>So is it really worth the effort in this case? Or is there something I have not really understood? </p>
  
  <p>Thanks!</p>