title: How to return different value in Mockito based on parameter attribute?
body: <p>The class that I test receive a client wrapper:</p>
  
  <p>The tested class (snippest)</p>
  
  <pre><code>private ClientWrapper cw
  public Tested(ClientWrapper cw) {
      this.cw = cw;
  }
  
  public String get(Request request) {
      return cw.getClient().get(request);
  }
  </code></pre>
  
  <p>The test initialization:</p>
  
  <pre><code>ClientWrapper cw = Mockito.mock(ClientWrapper.class);
  Client client = Mockito.mock(Client.class);
  Mockito.when(cw.getClient()).thenReturn(client);
  //Here is where I want to alternate the return value:
  Mockito.when(client.get(Mockito.any(Request.class))).thenReturn("100");
  </code></pre>
  
  <p>In the exmaple I always return "100", but the Request have an attribute <code>id</code> and I would like to return different values to <code>client.get(Request)</code> based on the <code>request.getId()</code> value.</p>
  
  <p>How can I do it?</p>