### Question:
CommonPaymentServiceImpl implements CommonPaymentService { @Override public PaymentWorkflow authorizePayment(PaymentWorkflow paymentWorkflow, String psuId, String authCode) { authInterceptor.setAccessToken(paymentWorkflow.bearerToken().getAccess_token()); SCAPaymentResponseTO scaPaymentResponse = paymentRestClient.authorizePayment(paymentWorkflow.paymentId(), paymentWorkflow.authId(), authCode).getBody(); paymentWorkflow.processSCAResponse(scaPaymentResponse); paymentWorkflow.setPaymentStatus(scaPaymentResponse.getTransactionStatus().name()); doUpdateAuthData(psuId, paymentWorkflow); return paymentWorkflow; }  @Override PaymentWorkflow selectScaForPayment(String encryptedPaymentId, String authorisationId, String scaMethodId, String consentAndAccessTokenCookieString, boolean isCancellationOperation, String psuId, BearerTokenTO tokenTO); @Override PaymentWorkflow identifyPayment(String encryptedPaymentId, String authorizationId, boolean strict, String consentCookieString, String psuId, BearerTokenTO bearerToken); @Override void updateAspspConsentData(PaymentWorkflow paymentWorkflow); @Override String resolveRedirectUrl(String encryptedPaymentId, String authorisationId, String consentAndAccessTokenCookieString, boolean isOauth2Integrated, String psuId, BearerTokenTO tokenTO, String authConfirmationCode); @Override PaymentWorkflow initiatePayment(PaymentWorkflow paymentWorkflow, String psuId); @Override PaymentWorkflow initiateCancelPayment(PaymentWorkflow paymentWorkflow, String psuId); @Override PaymentWorkflow authorizePayment(PaymentWorkflow paymentWorkflow, String psuId, String authCode); @Override PaymentWorkflow authorizeCancelPayment(PaymentWorkflow paymentWorkflow, String psuId, String authCode);  }### Answer:
@Test void authorizePayment() { when(paymentRestClient.authorizePayment(anyString(), anyString(), anyString())).thenReturn(ResponseEntity.ok(getSelectMethodResponse(ACSC.name()))); PaymentWorkflow result = service.authorizePayment(getExpectedWorkflow(RCVD.name(), null), PSU_ID, AUTH_CODE); assertThat(result).isEqualToComparingFieldByFieldRecursively(getExpectedWorkflow(ACSC.name(), ACSC.name())); }