### Question:
DecoupledPisScaAuthorisationService implements PisScaAuthorisationService { @Override public Optional<Xs2aPaymentCancellationAuthorisationSubResource> getCancellationAuthorisationSubResources(String paymentId) { return authorisationService.getCancellationAuthorisationSubResources(paymentId) .map(Xs2aPaymentCancellationAuthorisationSubResource::new); }  @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 getCancellationAuthorisationSubResources() { List<String> authorisationIds = Collections.singletonList(AUTHORISATION_ID); when(authorisationService.getCancellationAuthorisationSubResources(PAYMENT_ID)).thenReturn(Optional.of(authorisationIds)); Optional<Xs2aPaymentCancellationAuthorisationSubResource> actual = decoupledPisScaAuthorisationService.getCancellationAuthorisationSubResources(PAYMENT_ID); assertTrue(actual.isPresent()); assertEquals(1, actual.get().getAuthorisationIds().size()); assertTrue(actual.get().getAuthorisationIds().contains(AUTHORISATION_ID)); }