title: Mockito doAnswer & thenReturn in one method
body: <p>I have a situation where my method is returning some object, and method is containing some arguments and I have condition on the basis of returned response and one of the argument.</p>
  
  <pre><code>Map&lt;String,List&lt;Object&gt;&gt; testMap = new HashMap&lt;&gt;(); 
  Object obj = new Object(); 
  
  Set&lt;String&gt; test = myService.getModelSearchStrings(testMap, obj);
  if(CollectionUtils.isNotEmpty(test){
  
  }
  
  if(MapUtils.isNotEmpty(testMap){
  
  }
  </code></pre>
  
  <p>Test:</p>
  
  <pre><code>Set&lt;String&gt; result = new HashSet&lt;&gt;();
  result.add("123");
  
  Mockito.when(mockedMtnService.getModelSearchStrings(Mockito.anyMap(), Mockito.anyObject())).thenReturn(result);
  </code></pre>
  
  <p>I want to return Dummy response i.e. result HashSet and want to update argument value(Map).</p>