### Question:
PisCommonPaymentController implements PisCommonPaymentApi { @Override public ResponseEntity<ScaStatus> getAuthorisationScaStatus(String paymentId, String authorisationId) { CmsResponse<ScaStatus> response = authorisationServiceEncrypted.getAuthorisationScaStatus(authorisationId, new PisAuthorisationParentHolder(paymentId)); if (response.hasError()) { return new ResponseEntity<>(HttpStatus.NOT_FOUND); } return new ResponseEntity<>(response.getPayload(), HttpStatus.OK); }  @Override ResponseEntity<CreatePisCommonPaymentResponse> createCommonPayment(PisPaymentInfo request); @Override ResponseEntity<PisCommonPaymentDataStatusResponse> getPisCommonPaymentStatusById(String paymentId); @Override ResponseEntity<PisCommonPaymentResponse> getCommonPaymentById(String paymentId); @Override ResponseEntity<Void> updateCommonPaymentStatus(String paymentId, String status); @Override ResponseEntity<CreateAuthorisationResponse> createAuthorisation(String paymentId, CreateAuthorisationRequest request); @Override ResponseEntity<CreateAuthorisationResponse> createAuthorisationCancellation(String paymentId, CreateAuthorisationRequest request); @Override ResponseEntity<Authorisation> updateAuthorisation(String authorisationId, UpdateAuthorisationRequest request); @Override ResponseEntity<Void> updateAuthorisationStatus(String authorisationId, String authorisationStatus); @Override ResponseEntity<Authorisation> getAuthorisation(String authorisationId); @Override ResponseEntity<ScaStatus> getAuthorisationScaStatus(String paymentId, String authorisationId); @Override ResponseEntity<Authorisation> updateCancellationAuthorisation(String authorisationId, UpdateAuthorisationRequest request); @Override ResponseEntity<List<String>> getAuthorisationCancellation(String authorisationId); @Override ResponseEntity<List<String>> getAuthorisationsCancellation(String paymentId); @Override ResponseEntity<ScaStatus> getCancellationAuthorisationScaStatus(String paymentId, String authorisationId); @Override ResponseEntity<List<String>> getAuthorisations(String paymentId); @Override ResponseEntity<Boolean> isAuthenticationMethodDecoupled(String authorisationId, String authenticationMethodId); @Override ResponseEntity<Void> saveAuthenticationMethods(String authorisationId, List<CmsScaMethod> methods); @Override ResponseEntity<Boolean> updateScaApproach(String authorisationId, ScaApproach scaApproach); @Override ResponseEntity<AuthorisationScaApproachResponse> getAuthorisationScaApproach(String authorisationId); @Override ResponseEntity<AuthorisationScaApproachResponse> getCancellationAuthorisationScaApproach(String authorisationId); @Override ResponseEntity<Boolean> updateMultilevelScaRequired(String paymentId, boolean multilevelSca);  }### Answer:
@Test void getAuthorisationScaStatus_success() { when(authorisationServiceEncrypted.getAuthorisationScaStatus(AUTHORISATION_ID, new PisAuthorisationParentHolder(PAYMENT_ID))) .thenReturn(CmsResponse.<ScaStatus>builder().payload(SCA_STATUS).build()); ResponseEntity<ScaStatus> result = pisCommonPaymentController.getAuthorisationScaStatus(PAYMENT_ID, AUTHORISATION_ID); assertEquals(HttpStatus.OK, result.getStatusCode()); assertEquals(SCA_STATUS, result.getBody()); }
@Test void getAuthorisationScaStatus_failure_wrongIds() { when(authorisationServiceEncrypted.getAuthorisationScaStatus(WRONG_AUTHORISATION_ID, new PisAuthorisationParentHolder(WRONG_PAYMENT_ID))) .thenReturn(CmsResponse.<ScaStatus>builder().error(CmsError.TECHNICAL_ERROR).build()); ResponseEntity<ScaStatus> result = pisCommonPaymentController.getAuthorisationScaStatus(WRONG_PAYMENT_ID, WRONG_AUTHORISATION_ID); assertEquals(HttpStatus.NOT_FOUND, result.getStatusCode()); assertNull(result.getBody()); }