### Question:
UpdatePaymentAfterSpiServiceInternalEncrypted implements UpdatePaymentAfterSpiServiceEncrypted { @Override @Transactional public CmsResponse<Boolean> updatePaymentCancellationInternalRequestId(@NotNull String encryptedPaymentId, @NotNull String internalRequestId) { Optional<String> decryptIdOptional = securityDataService.decryptId(encryptedPaymentId); if (decryptIdOptional.isEmpty()) { log.info("Encrypted Payment ID [{}]. Update cancellation payment internal request ID failed, couldn't decrypt payment id", encryptedPaymentId); return CmsResponse.<Boolean>builder() .error(TECHNICAL_ERROR) .build(); } return updatePaymentStatusAfterSpiService.updatePaymentCancellationInternalRequestId(decryptIdOptional.get(), internalRequestId); }  @Override @Transactional CmsResponse<Boolean> updatePaymentStatus(@NotNull String encryptedPaymentId, @NotNull TransactionStatus status); @Override @Transactional CmsResponse<Boolean> updatePaymentCancellationTppRedirectUri(@NotNull String encryptedPaymentId, @NotNull TppRedirectUri tppRedirectUri); @Override @Transactional CmsResponse<Boolean> updatePaymentCancellationInternalRequestId(@NotNull String encryptedPaymentId, @NotNull String internalRequestId);  }### Answer:
@Test void updatePaymentCancellationInternalRequestId_success() { when(securityDataService.decryptId(ENCRYPTED_PAYMENT_ID)).thenReturn(Optional.of(DECRYPTED_PAYMENT_ID)); when(updatePaymentStatusAfterSpiService.updatePaymentCancellationInternalRequestId(eq(DECRYPTED_PAYMENT_ID), eq(INTERNAL_REQUEST_ID))) .thenReturn(CmsResponse.<Boolean>builder() .payload(true) .build()); CmsResponse<Boolean> actual = updatePaymentStatusAfterSpiServiceInternalEncrypted.updatePaymentCancellationInternalRequestId(ENCRYPTED_PAYMENT_ID, INTERNAL_REQUEST_ID); assertTrue(actual.isSuccessful()); assertTrue(actual.getPayload()); verify(securityDataService, times(1)).decryptId(ENCRYPTED_PAYMENT_ID); verify(updatePaymentStatusAfterSpiService, times(1)).updatePaymentCancellationInternalRequestId(eq(DECRYPTED_PAYMENT_ID), eq(INTERNAL_REQUEST_ID)); }