title: Mockito and Mockito.any(Map.class)
body: <p>Using Mockito I got in trouble with the following:</p>
  
  <pre><code>Mockito.when(restOperationMock.exchange(
        Mockito.anyString(),     
        Mockito.any(HttpMethod.class),
        Mockito.any(HttpEntity.class),  
        Mockito.eq(CustomerResponse.class),
        **Mockito.anyMap()**)).
      thenReturn(re);
  </code></pre>
  
  <p>The problem was the method wasn't intercepted because I was using <code>Mockito.any(Map.class)</code> instead of <code>Mockito.anyMap()</code> and I was passing as a parameter a <code>HashMap</code>. What are the differences between <code>Mockito.any(Map.class)</code> and  <code>Mockito.anyMap()</code>?</p>