### Question:
PisCommonPaymentController implements PisCommonPaymentApi { @Override public ResponseEntity<Boolean> updateMultilevelScaRequired(String paymentId, boolean multilevelSca) { CmsResponse<Boolean> response = pisCommonPaymentServiceEncrypted.updateMultilevelSca(paymentId, multilevelSca); if (response.isSuccessful() && BooleanUtils.isTrue(response.getPayload())) { return new ResponseEntity<>(response.getPayload(), HttpStatus.OK); } return new ResponseEntity<>(HttpStatus.NOT_FOUND); }  @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 updateMultilevelScaRequired_Ok() { when(pisCommonPaymentService.updateMultilevelSca(PAYMENT_ID, true)) .thenReturn(CmsResponse.<Boolean>builder().payload(true).build()); ResponseEntity<Boolean> actualResponse = pisCommonPaymentController.updateMultilevelScaRequired(PAYMENT_ID, true); assertEquals(HttpStatus.OK, actualResponse.getStatusCode()); assertTrue(actualResponse.getBody()); }
@Test void updateMultilevelScaRequired_NotFound() { when(pisCommonPaymentService.updateMultilevelSca(PAYMENT_ID, true)) .thenReturn(CmsResponse.<Boolean>builder().payload(false).build()); ResponseEntity<Boolean> actualResponse = pisCommonPaymentController.updateMultilevelScaRequired(PAYMENT_ID, true); assertEquals(HttpStatus.NOT_FOUND, actualResponse.getStatusCode()); assertNull(actualResponse.getBody()); }