title: How to match null passed to parameter of Class<T> with Mockito
body: <p>I have methods like these: </p>
  
  <pre><code>public &lt;T&gt; method(String s, Class&lt;T&gt; t) {...}
  </code></pre>
  
  <p>That I need to check that <code>null</code> is passed to the second argument when using matchers for the other parameters, I have been doing this : </p>
  
  <pre><code>@SuppressWarnings("unchecked")
  verify(client).method(eq("String"), any(Class.class));
  </code></pre>
  
  <p>But is there a better way (without suppress warnings) ? <code>T</code> represents the return type of some other method, which is sometimes <code>void</code> and in these cases <code>null</code> is passed in.</p>