title: Replaced method with long parameter list with builder pattern. How to test it with Mockito?
body: <p>I had a long method that looked like this:</p>
  
  <pre><code>public class Executor {
     public void do(int a, int b, C c, D d, int e, int f);
  }
  </code></pre>
  
  <p>I replaced this method with a builder pattern and call the method now like this:</p>
  
  <pre><code>executor.do(a).withB(b).withC(c).withD(d).withE(e).withF(f);
  </code></pre>
  
  <p>Previously, I tested my method like this using Mockito:</p>
  
  <pre><code>verify(mockExecutor).do(anyInt(), anyInt(), eq(c), eq(d), anyInt(), anyInt());
  </code></pre>
  
  <p>However, I can do that now. And I also can't use a ArgumentCaptor to capture an argument that is passed to a method. What can I do now?</p>