title: Mockito. Verify method param to be a particular class
body: <p>I have a method:</p>
  
  <pre><code>void putObject(&lt;T extends BaseEntity&gt; param)
  </code></pre>
  
  <p>Have some test where I mock this method, but I wonder, how to verify that method was called with parameter of particular class? Tried to do it in such ways:</p>
  
  <pre><code>verify(foo).putObject((SomeClass)anyObject());
  ------
  verify(foo).putObject(any(SomeClass.class));
  ------
  ArgumentCaptor&lt;SomeClass&gt; parameter = ArgumentCaptor
              .forClass(SomeClass.class);
  verify(foo).putObject(parametr);
  </code></pre>
  
  <p>Works only the second variant with <code>any()</code>, but it doesn<code>t check class of</code>parameter`. So if it is possible to verify that method get any object of particular class?</p>