### Question:
PisCommonPaymentServiceInternal implements PisCommonPaymentService { @Override @Transactional public CmsResponse<Boolean> updateMultilevelSca(String paymentId, boolean multilevelScaRequired) { Optional<PisCommonPaymentData> pisCommonPaymentDataOptional = pisCommonPaymentDataRepository.findByPaymentId(paymentId); if (pisCommonPaymentDataOptional.isEmpty()) { log.info("Payment ID: [{}]. Update multilevel SCA required status failed, because payment is not found", paymentId); return CmsResponse.<Boolean>builder() .payload(false) .build(); } PisCommonPaymentData payment = pisCommonPaymentDataOptional.get(); payment.setMultilevelScaRequired(multilevelScaRequired); return CmsResponse.<Boolean>builder() .payload(true) .build(); }  @Override @Transactional CmsResponse<CreatePisCommonPaymentResponse> createCommonPayment(PisPaymentInfo request); @Override @Transactional CmsResponse<TransactionStatus> getPisCommonPaymentStatusById(String paymentId); @Override @Transactional CmsResponse<PisCommonPaymentResponse> getCommonPaymentById(String paymentId); @Override @Transactional CmsResponse<Boolean> updateCommonPaymentStatusById(String paymentId, TransactionStatus status); @Override @Transactional CmsResponse<Boolean> updateMultilevelSca(String paymentId, boolean multilevelScaRequired); @Override CmsResponse<List<PsuIdData>> getPsuDataListByPaymentId(String paymentId);  }### Answer:
@Test void updateMultilevelSca_ShouldReturnTrue() { when(pisCommonPaymentDataRepository.findByPaymentId(PAYMENT_ID)).thenReturn(Optional.of(pisCommonPaymentData)); CmsResponse<Boolean> actualResponse = pisCommonPaymentService.updateMultilevelSca(PAYMENT_ID, true); assertTrue(actualResponse.isSuccessful()); assertTrue(actualResponse.getPayload()); }
@Test void updateMultilevelSca_ShouldReturnFalse() { when(pisCommonPaymentDataRepository.findByPaymentId(PAYMENT_ID)).thenReturn(Optional.empty()); CmsResponse<Boolean> actualResponse = pisCommonPaymentService.updateMultilevelSca(PAYMENT_ID, true); assertTrue(actualResponse.isSuccessful()); assertFalse(actualResponse.getPayload()); }