title: Mockito throws InvalidUseOfMatchersException with ArgumentCaptor
body: <p>I am trying to use mockito's <code>ArgumentCaptor</code> class to capture some parameter and then do some verifications on it. But it's throwing an exception. </p>
  
  <p>This is what is printed as the error message. </p>
  
  <blockquote>
    <p>org.mockito.exceptions.misusing.InvalidUseOfMatchersException: 
    Invalid use of argument matchers!
    0 matchers expected, 1 recorded:</p>
  </blockquote>
  
  <p>Below is the code which is throwing the exception.</p>
  
  <pre><code>    //Arrange
      int amount = 100;
  
      DonationTransaction transaction = getPendingTransaction(player, amount);
      when(mockDonationTransactionDAO.getPendingTransactions(player)).thenReturn(Arrays.asList(transaction));
  
      ArgumentCaptor&lt;DonationAttribution&gt; argumentCaptor = ArgumentCaptor.forClass(DonationAttribution.class);
  
      //Act
      donationService.applyPendingDonations(player, playerDTO);
  
      //Assert
      verify(mockDonationAttributionDAO).save(argumentCaptor.capture()); //Exception here
      ...
  </code></pre>
  
  <p>I am using Junit5 and mockito version 2.7.22.</p>
  
  <p>Not sure if I am missing something obvious here. </p>
  
  <p>My DonationAttributionDao extends an abstract DAO if that helps with anything and the save method is defined in the abstract class which takes as parameter the base class of the Argument I am trying to capture.</p>