### Question:
DecoupledAisAuthorizationService implements AisAuthorizationService { @Override public Optional<Authorisation> getConsentAuthorizationById(String authorisationId) { return authorisationService.getAuthorisationById(authorisationId); }  @Override Optional<CreateConsentAuthorizationResponse> createConsentAuthorization(PsuIdData psuData, String consentId); @Override AuthorisationProcessorResponse updateConsentPsuData(UpdateAuthorisationRequest request, AuthorisationProcessorResponse response); @Override Optional<Authorisation> getConsentAuthorizationById(String authorisationId); @Override Optional<ScaStatus> getAuthorisationScaStatus(String consentId, String authorisationId); @Override ScaApproach getScaApproachServiceType();  }### Answer:
@Test void getAccountConsentAuthorizationById_success() { when(authorisationService.getAuthorisationById(AUTHORISATION_ID)) .thenReturn(Optional.of(ACCOUNT_CONSENT_AUTHORIZATION)); Optional<Authorisation> actualResponse = decoupledAisAuthorizationService.getConsentAuthorizationById(AUTHORISATION_ID); assertThat(actualResponse.isPresent()).isTrue(); assertThat(actualResponse.get()).isEqualTo(ACCOUNT_CONSENT_AUTHORIZATION); }
@Test void getAccountConsentAuthorizationById_wrongIds_fail() { when(authorisationService.getAuthorisationById(WRONG_AUTHORISATION_ID)) .thenReturn(Optional.empty()); Optional<Authorisation> actualResponse = decoupledAisAuthorizationService.getConsentAuthorizationById(WRONG_AUTHORISATION_ID); assertThat(actualResponse.isPresent()).isFalse(); }