### Question:
Xs2aAisConsentService { public void updateConsentAuthorisation(UpdateConsentPsuDataReq updatePsuData) { Optional.ofNullable(updatePsuData) .ifPresent(req -> { final UpdateAuthorisationRequest request = consentAuthorisationMapper.mapToAuthorisationRequest(req); authorisationService.updateAuthorisation(request, req.getAuthorizationId()); }); }  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 updateConsentAuthorization() { UpdateConsentPsuDataReq updateConsentPsuDataReq = new UpdateConsentPsuDataReq(); updateConsentPsuDataReq.setAuthorizationId(AUTHORISATION_ID); UpdateAuthorisationRequest request = new UpdateAuthorisationRequest(); when(aisConsentAuthorisationMapper.mapToAuthorisationRequest(updateConsentPsuDataReq)) .thenReturn(request); xs2aAisConsentService.updateConsentAuthorisation(updateConsentPsuDataReq); verify(authorisationService, times(1)).updateAuthorisation(request, AUTHORISATION_ID); }
@Test void updateConsentAuthorization_nullValue() { xs2aAisConsentService.updateConsentAuthorisation(null); verify(authorisationService, never()).updateAuthorisation(any(), any()); }