### Question:
PiisConsentService { public ResponseObject<Xs2aScaStatusResponse> getConsentAuthorisationScaStatus(String consentId, String authorisationId) { ResponseObject<ConfirmationOfFundsConsentScaStatus> consentScaStatusResponse = piisConsentAuthorisationService.getConsentAuthorisationScaStatus(consentId, authorisationId); if (consentScaStatusResponse.hasError()) { return ResponseObject.<Xs2aScaStatusResponse>builder() .fail(consentScaStatusResponse.getError()) .build(); } ConfirmationOfFundsConsentScaStatus consentScaStatus = consentScaStatusResponse.getBody(); Xs2aScaStatusResponse response = new Xs2aScaStatusResponse(consentScaStatus.getScaStatus(), null); return ResponseObject.<Xs2aScaStatusResponse>builder() .body(response) .build(); }  ResponseObject<Xs2aConfirmationOfFundsResponse> createPiisConsentWithResponse(CreatePiisConsentRequest request, PsuIdData psuData, boolean explicitPreferred); ResponseObject<PiisConsent> getPiisConsentById(String consentId); ResponseObject<ConsentStatusResponse> getPiisConsentStatusById(String consentId); ResponseObject<Xs2aAuthorisationSubResources> getConsentInitiationAuthorisations(String consentId); ResponseObject<Xs2aScaStatusResponse> getConsentAuthorisationScaStatus(String consentId, String authorisationId); ResponseObject<Void> deleteAccountConsentsById(String consentId); ResponseObject<AuthorisationResponse> createPiisAuthorisation(PsuIdData psuData, String consentId, String password); ResponseObject<UpdateConsentPsuDataResponse> updateConsentPsuData(UpdateConsentPsuDataReq updatePsuData);  }### Answer:
@Test void getConsentAuthorisationScaStatus_Success() { ConfirmationOfFundsConsentScaStatus confirmationOfFundsConsentScaStatus = new ConfirmationOfFundsConsentScaStatus(PSU_ID_DATA, piisConsent, ScaStatus.RECEIVED); when(piisConsentAuthorisationService.getConsentAuthorisationScaStatus(CONSENT_ID, AUTHORISATION_ID)) .thenReturn(ResponseObject.<ConfirmationOfFundsConsentScaStatus>builder().body(confirmationOfFundsConsentScaStatus).build()); ResponseObject<Xs2aScaStatusResponse> xs2aScaStatusResponseResponseObject = piisConsentService.getConsentAuthorisationScaStatus(CONSENT_ID, AUTHORISATION_ID); assertEquals(confirmationOfFundsConsentScaStatus.getScaStatus(), xs2aScaStatusResponseResponseObject.getBody().getScaStatus()); verify(piisConsentAuthorisationService, atLeastOnce()).getConsentAuthorisationScaStatus(CONSENT_ID, AUTHORISATION_ID); }
@Test void getConsentAuthorisationScaStatus_Failed() { when(piisConsentAuthorisationService.getConsentAuthorisationScaStatus(CONSENT_ID, AUTHORISATION_ID)) .thenReturn(ResponseObject.<ConfirmationOfFundsConsentScaStatus>builder().fail(CONSENT_UNKNOWN_ERROR).build()); ResponseObject<Xs2aScaStatusResponse> xs2aScaStatusResponseResponseObject = piisConsentService.getConsentAuthorisationScaStatus(CONSENT_ID, AUTHORISATION_ID); assertTrue(xs2aScaStatusResponseResponseObject.hasError()); assertEquals(CONSENT_UNKNOWN_ERROR, xs2aScaStatusResponseResponseObject.getError()); verify(piisConsentAuthorisationService, atLeastOnce()).getConsentAuthorisationScaStatus(CONSENT_ID, AUTHORISATION_ID); }