### Question:
PisCommonPaymentController implements PisCommonPaymentApi { @Override public ResponseEntity<AuthorisationScaApproachResponse> getAuthorisationScaApproach(String authorisationId) { CmsResponse<AuthorisationScaApproachResponse> response = authorisationServiceEncrypted.getAuthorisationScaApproach(authorisationId); 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 getAuthorisationScaApproach_success() { when(authorisationServiceEncrypted.getAuthorisationScaApproach(AUTHORISATION_ID)) .thenReturn(CmsResponse.<AuthorisationScaApproachResponse>builder().payload(new AuthorisationScaApproachResponse(ScaApproach.EMBEDDED)).build()); ResponseEntity<AuthorisationScaApproachResponse> response = pisCommonPaymentController.getAuthorisationScaApproach(AUTHORISATION_ID); verify(authorisationServiceEncrypted, times(1)).getAuthorisationScaApproach(eq(AUTHORISATION_ID)); assertEquals(HttpStatus.OK, response.getStatusCode()); assertEquals(ScaApproach.EMBEDDED, response.getBody().getScaApproach()); }
@Test void getAuthorisationScaApproach_error() { when(authorisationServiceEncrypted.getAuthorisationScaApproach(AUTHORISATION_ID)) .thenReturn(CmsResponse.<AuthorisationScaApproachResponse>builder().error(CmsError.TECHNICAL_ERROR).build()); ResponseEntity<AuthorisationScaApproachResponse> response = pisCommonPaymentController.getAuthorisationScaApproach(AUTHORISATION_ID); verify(authorisationServiceEncrypted, times(1)).getAuthorisationScaApproach(eq(AUTHORISATION_ID)); assertEquals(HttpStatus.NOT_FOUND, response.getStatusCode()); assertNull(response.getBody()); }