### Question:
PisPaymentController implements PisPaymentApi { @Override public ResponseEntity<Void> updatePaymentCancellationTppRedirectUri(String paymentId, String tpPRedirectURI, String tpPNokRedirectURI) { CmsResponse<Boolean> response = updatePaymentStatusAfterSpiService.updatePaymentCancellationTppRedirectUri( paymentId, new TppRedirectUri( StringUtils.defaultIfBlank(tpPRedirectURI, ""), StringUtils.defaultIfBlank(tpPNokRedirectURI, ""))); if (response.isSuccessful() && BooleanUtils.isTrue(response.getPayload())) { return new ResponseEntity<>(HttpStatus.OK); } return new ResponseEntity<>(HttpStatus.BAD_REQUEST); }  @Override ResponseEntity<String> getPaymentIdByEncryptedString(String encryptedId); @Override ResponseEntity<Void> updatePaymentStatusAfterSpiService(String paymentId, String status); @Override ResponseEntity<Void> updatePaymentCancellationTppRedirectUri(String paymentId, String tpPRedirectURI, String tpPNokRedirectURI); @Override ResponseEntity<Void> updatePaymentCancellationInternalRequestId(String paymentId, String internalRequestId);  }### Answer:
@Test void updatePaymentCancellationTppRedirectUri() { when(updatePaymentStatusAfterSpiService.updatePaymentCancellationTppRedirectUri(eq(PAYMENT_ID), tppRedirectUriCaptor.capture())) .thenReturn(CmsResponse.<Boolean>builder().payload(true).build()); ResponseEntity<Void> response = pisPaymentController.updatePaymentCancellationTppRedirectUri(PAYMENT_ID, TPP_OK_REDIRECT_ORI, TPP_NOK_REDIRECT_ORI); assertEquals(HttpStatus.OK, response.getStatusCode()); assertEquals(TPP_OK_REDIRECT_ORI, tppRedirectUriCaptor.getValue().getUri()); assertEquals(TPP_NOK_REDIRECT_ORI, tppRedirectUriCaptor.getValue().getNokUri()); }
@Test void updatePaymentCancellationTppRedirectUri_Fail() { when(updatePaymentStatusAfterSpiService.updatePaymentCancellationTppRedirectUri(eq(PAYMENT_ID), tppRedirectUriCaptor.capture())) .thenReturn(CmsResponse.<Boolean>builder().payload(false).build()); ResponseEntity<Void> response = pisPaymentController.updatePaymentCancellationTppRedirectUri(PAYMENT_ID, TPP_OK_REDIRECT_ORI, TPP_NOK_REDIRECT_ORI); assertEquals(HttpStatus.BAD_REQUEST, response.getStatusCode()); assertEquals(TPP_OK_REDIRECT_ORI, tppRedirectUriCaptor.getValue().getUri()); assertEquals(TPP_NOK_REDIRECT_ORI, tppRedirectUriCaptor.getValue().getNokUri()); }