### Question:
Xs2aAisConsentService { public void consentActionLog(String tppId, String consentId, ActionStatus actionStatus, String requestUri, boolean updateUsage, String resourceId, String transactionId) { try { aisConsentService.checkConsentAndSaveActionLog(new AisConsentActionRequest(tppId, consentId, actionStatus, requestUri, updateUsage, resourceId, transactionId)); } catch (WrongChecksumException e) { log.info("consentActionLog cannot be executed, checksum verification failed"); } }  Optional<Xs2aCreateAisConsentResponse> createConsent(CreateConsentReq request, PsuIdData psuData, TppInfo tppInfo); Optional<AisConsent> getAccountConsentById(String consentId); boolean findAndTerminateOldConsentsByNewConsentId(String newConsentId); void updateConsentStatus(String consentId, ConsentStatus consentStatus); void consentActionLog(String tppId, String consentId, ActionStatus actionStatus, String requestUri, boolean updateUsage,
                                 String resourceId, String transactionId); void updateConsentAuthorisation(UpdateConsentPsuDataReq updatePsuData); CmsResponse<AisConsent> updateAspspAccountAccess(String consentId, AccountAccess accountAccess); Optional<List<String>> getAuthorisationSubResources(String consentId); void updateMultilevelScaRequired(String consentId, boolean multilevelScaRequired);  }### Answer:
@Test void consentActionLog() throws WrongChecksumException { ActionStatus actionStatus = ActionStatus.SUCCESS; ArgumentCaptor<AisConsentActionRequest> argumentCaptor = ArgumentCaptor.forClass(AisConsentActionRequest.class); xs2aAisConsentService.consentActionLog(TPP_ID, CONSENT_ID, actionStatus, REQUEST_URI, true, null, null); verify(aisConsentServiceEncrypted).checkConsentAndSaveActionLog(argumentCaptor.capture()); AisConsentActionRequest aisConsentActionRequest = argumentCaptor.getValue(); assertThat(aisConsentActionRequest.getTppId()).isEqualTo(TPP_ID); assertThat(aisConsentActionRequest.getConsentId()).isEqualTo(CONSENT_ID); assertThat(aisConsentActionRequest.getActionStatus()).isEqualTo(actionStatus); assertThat(aisConsentActionRequest.getRequestUri()).isEqualTo(REQUEST_URI); assertThat(aisConsentActionRequest.isUpdateUsage()).isTrue(); }
@Test void consentActionLog_WrongChecksumException() throws WrongChecksumException { ActionStatus actionStatus = ActionStatus.SUCCESS; ArgumentCaptor<AisConsentActionRequest> argumentCaptor = ArgumentCaptor.forClass(AisConsentActionRequest.class); when(aisConsentServiceEncrypted.checkConsentAndSaveActionLog(any(AisConsentActionRequest.class))) .thenThrow(WrongChecksumException.class); xs2aAisConsentService.consentActionLog(TPP_ID, CONSENT_ID, actionStatus, REQUEST_URI, true, null, null); verify(aisConsentServiceEncrypted).checkConsentAndSaveActionLog(argumentCaptor.capture()); AisConsentActionRequest aisConsentActionRequest = argumentCaptor.getValue(); assertThat(aisConsentActionRequest.getTppId()).isEqualTo(TPP_ID); assertThat(aisConsentActionRequest.getConsentId()).isEqualTo(CONSENT_ID); assertThat(aisConsentActionRequest.getActionStatus()).isEqualTo(actionStatus); assertThat(aisConsentActionRequest.getRequestUri()).isEqualTo(REQUEST_URI); assertThat(aisConsentActionRequest.isUpdateUsage()).isTrue(); }