### Question:
EmbeddedPisScaAuthorisationService implements PisScaAuthorisationService { @Override public Optional<ScaStatus> getAuthorisationScaStatus(String paymentId, String authorisationId) { return authorisationService.getAuthorisationScaStatus(paymentId, authorisationId); }  @Override Optional<Xs2aCreatePisAuthorisationResponse> createCommonPaymentAuthorisation(String paymentId, PaymentType paymentType, PsuIdData psuData); @Override Xs2aUpdatePisCommonPaymentPsuDataResponse updateCommonPaymentPsuData(Xs2aUpdatePisCommonPaymentPsuDataRequest request); @Override void updateAuthorisation(UpdateAuthorisationRequest request, AuthorisationProcessorResponse response); @Override void updateCancellationAuthorisation(UpdateAuthorisationRequest request, AuthorisationProcessorResponse response); @Override Optional<Xs2aCreatePisCancellationAuthorisationResponse> createCommonPaymentCancellationAuthorisation(String paymentId, PaymentType paymentType, PsuIdData psuData); @Override Optional<Xs2aPaymentCancellationAuthorisationSubResource> getCancellationAuthorisationSubResources(String paymentId); @Override Xs2aUpdatePisCommonPaymentPsuDataResponse updateCommonPaymentCancellationPsuData(Xs2aUpdatePisCommonPaymentPsuDataRequest request); @Override Optional<Xs2aAuthorisationSubResources> getAuthorisationSubResources(String paymentId); @Override Optional<ScaStatus> getAuthorisationScaStatus(String paymentId, String authorisationId); @Override Optional<ScaStatus> getCancellationAuthorisationScaStatus(String paymentId, String authorisationId); @Override ScaApproach getScaApproachServiceType();  }### Answer:
@Test void getAuthorisationScaStatus_success() { when(pisAuthorisationService.getAuthorisationScaStatus(PAYMENT_ID, AUTHORISATION_ID)) .thenReturn(Optional.of(ScaStatus.RECEIVED)); Optional<ScaStatus> actual = embeddedPisScaAuthorisationService.getAuthorisationScaStatus(PAYMENT_ID, AUTHORISATION_ID); assertTrue(actual.isPresent()); assertEquals(ScaStatus.RECEIVED, actual.get()); }
@Test void getAuthorisationScaStatus_wrongIds_failure() { when(pisAuthorisationService.getAuthorisationScaStatus(WRONG_PAYMENT_ID, WRONG_AUTHORISATION_ID)) .thenReturn(Optional.empty()); Optional<ScaStatus> actual = embeddedPisScaAuthorisationService.getAuthorisationScaStatus(WRONG_PAYMENT_ID, WRONG_AUTHORISATION_ID); assertFalse(actual.isPresent()); }