title: Mockito : argument type mismatch?
body: <p>I am getting FAILED: <code>processStandaloneCancelAuthRequest(00, "true")</code>
  <code>java.lang.IllegalArgumentException:</code> argument type mismatch....error. I am doing unit testing using Mockito and passing <code>00</code> as sample input and true is the sample output.</p>
  
  <pre><code>  @BeforeMethod
    public void  beforeMethod(){
        super.beforeMethod();
  
        authProcessor = new MastercardCancelAuthProcessor();
        authProcessor.setPaymentRqIsoAuthRqTransformer(paymentRqIsoAuthRqTransformer);
        authProcessor.setIsoAuthRsPaymentRsTransformer(isoAuthRsPaymentRsTransformer);
        authProcessor.setAuthDatabaseUpdater(authDatabaseUpdater);
        authProcessor.setSsgIsoService(ssgIsoService);
        authProcessor.setRemarkGeneratorSelector(remarkGeneratorSelector);
        authProcessor.setIsoMessageTransformer(isoMessageTransformer);
        authProcessor.setOutMasker(outMasker);
        authProcessor.setInMasker(inMasker);
        List&lt;Validator&lt;PaymentRQ&gt;&gt; validators = new    ArrayList&lt;Validator&lt;PaymentRQ&gt;&gt;      ();
         validators.add(validator);
         authProcessor.setValidators(validators);
  
         requestInfo = new RequestInfo();
         requestInfo.setTransactionId(TRANS_ID);
         authProcessor.setRequestInfo(requestInfo);
         // authProcessor.setUpdateAuthDatabase(true);
         paymentRq = new MockPaymentRQFactory().createDefaultPaymentRQ();
         Action action = new Action();
         action.setType(SubAction.VOID.getValue());
         action.setValue(PaymentConstant.CANCEL_AUTH_ACTION);
         paymentRq.setAction(action);
  
     }
  
  
     @DataProvider
     public Object[][] createDataProviderForTestingVariousApprovalCodes(){
         return new Object[][]{
            { "00", "true"},
            {"08", "true"},
          };
     }
  
     @Test(dataProvider = "createDataProviderForTestingVariousApprovalCodes")
     public void processStandaloneCancelAuthRequest(PaymentRQ paymentRq, String    transactionId) throws PymtApplicationException {
  
          MastercardCancelIsoMessageRequestHolder req = mock(MastercardCancelIsoMessageRequestHolder.class);
          requestInfo.setRequestObject(paymentRq);
          when(paymentRqIsoAuthRqTransformer.transform()).thenReturn(req);
  
          SSGDataObject routingInfo = new SSGDataObject();
            when(routingInfoCreator.createRoutingInfo(paymentRq.getAction().getValue(),paymentRq.getMerchantDetail().getMerchantID())).thenReturn(routingInfo);
  
          MastercardCancelIsoMessageResponseHolder resp = mock(MastercardCancelIsoMessageResponseHolder.class);
          when(ssgIsoService.send(eq(req), eq(isoMessageTransformer), any(PciDataMasker.class), any(PciDataMasker.class), eq(routingInfo))).thenReturn(resp);
  
          PaymentRS paymentRs = createDummyPaymentRS(paymentRq);
             when(isoAuthRsPaymentRsTransformer.transformIsoAuthRsToPaymentRs(paymentRq, req, resp)).thenReturn(paymentRs);
  
          when(remarkGeneratorSelector.select(paymentRq)).thenReturn(remarkGenerator);
          String remark1 = "REMARK1";
          List&lt;String&gt; authRemarks = Arrays.asList(remark1);
          when(remarkGenerator.generateRemarks(RemarkType.CANCEL_AUTH, paymentRq, paymentRs)).thenReturn(authRemarks);
  
  
          PaymentRS actualPaymentRs = authProcessor.processRequest( paymentRq, TRANS_ID);
          assertEquals(actualPaymentRs, paymentRs);
  
          verify(validator).validate(paymentRq);
          verify(routingInfoCreator).createRoutingInfo(paymentRq.getAction().getValue(),paymentRq.getMerchantDetail().getMerchantID());
          verify(paymentRqIsoAuthRqTransformer).transform();
          verify(paymentRqIsoAuthRqTransformer).init();
          verify(ssgIsoService).send(eq(req), eq(isoMessageTransformer), eq(outMasker), eq(inMasker), eq(routingInfo));
          verify(isoAuthRsPaymentRsTransformer).transformIsoAuthRsToPaymentRs(paymentRq, req, resp);
         // verify(authDatabaseUpdater).updateAuthRecords(TRANS_ID, paymentRq, req, resp,paymentRs);
          verify(remarkGeneratorSelector).select(paymentRq);
          verify(remarkGenerator).generateRemarks(RemarkType.CANCEL_AUTH,paymentRq, paymentRs);
      }
  
      private PaymentRS createDummyPaymentRS(PaymentRQ paymentRq2) {
          // TODO Auto-generated method stub
          return null;
      }
  </code></pre>