title: JUnit can you use verify() and doReturn() at the same time?
body: <p>I have some async calls using CompletableFutures and my unit tests are failing. Most of the time they are not failing, but once in a while they may fail… I'm getting the error message that:</p>
  <pre><code>org.mockito.exceptions.misusing.PotentialStubbingProblem: 
  Strict stubbing argument mismatch. Please check:
   - this invocation of 'queryForList' method:
      namedParameterJdbcTemplate.queryForList(
      null,
      MapSqlParameterSource {id=0},
      class java.lang.String
  );
  ...
  Typically, stubbing argument mismatch indicates user mistake when writing tests.
  Mockito fails early so that you can debug potential problem easily.
  However, there are legit scenarios when this exception generates false negative signal:
    - stubbing the same method multiple times using 'given().will()' or 'when().then()' API
      Please use 'will().given()' or 'doReturn().when()' API for stubbing.
    - stubbed method is intentionally invoked with different arguments by code under test
      Please use default or 'silent' JUnit Rule (equivalent of Strictness.LENIENT).
  </code></pre>
  <p>I've tried using <code>doReturn().when()</code> but it still gave the same error. Using <code>Mockito.lenient()</code> fixed it, but I feel using the <code>Mockito.verify()</code> method is the correct approach for this stubbing/async problem.</p>
  <p>After adding the verification and the mock to return:</p>
  <pre><code>        Mockito.verify(namedParameterJdbcTemplate, Mockito.timeout(100).times(1)).queryForList(Mockito.anyString(), Mockito.any(MapSqlParameterSource.class), Mockito.eq(String.class));
          Mockito.verify(namedParameterJdbcTemplate, Mockito.timeout(100).times(1)).query(Mockito.anyString(), Mockito.any(MapSqlParameterSource.class), Mockito.any(BasicMapper.class));
  
          Mockito.when(namedParameterJdbcTemplate.queryForList(Mockito.anyString(), Mockito.any(MapSqlParameterSource.class), Mockito.eq(String.class))).thenReturn(null);
          Mockito.when(namedParameterJdbcTemplate.query(Mockito.anyString(), Mockito.any(MapSqlParameterSource.class), Mockito.any(BasicMapper.class))).thenReturn(offerEvents);
  </code></pre>
  <p>I got this error</p>
  <pre><code>Wanted but not invoked:
  namedParameterJdbcTemplate.queryForList
  ...
  Actually, there were zero interactions with this mock.
  </code></pre>
  <p>Whats the best way I can resolve this issue?</p>