### Question:
PisAspspDataService { public String getInternalPaymentIdByEncryptedString(String encryptedId) { CmsResponse<String> cmsResponse = pisCommonPaymentServiceEncrypted.getDecryptedId(encryptedId); return cmsResponse.isSuccessful() ? cmsResponse.getPayload() : null; }  String getInternalPaymentIdByEncryptedString(String encryptedId);  }### Answer:
@Test void getInternalPaymentIdByEncryptedString_success() { when(pisCommonPaymentServiceEncrypted.getDecryptedId(ENCRYPTED_ID)) .thenReturn(CmsResponse.<String>builder().payload(PAYMENT_ID).build()); String actualResponse = pisAspspDataService.getInternalPaymentIdByEncryptedString(ENCRYPTED_ID); assertThat(actualResponse).isEqualTo(PAYMENT_ID); }
@Test void getInternalPaymentIdByEncryptedString_failed() { when(pisCommonPaymentServiceEncrypted.getDecryptedId(WRONG_ID)) .thenReturn(CmsResponse.<String>builder().error(CmsError.TECHNICAL_ERROR).build()); String actualResponse = pisAspspDataService.getInternalPaymentIdByEncryptedString(WRONG_ID); assertThat(actualResponse).isNull(); }