### Question:
PaymentModelMapperPsd2 { public PisPaymentCancellationRequest mapToPaymentCancellationRequest(String paymentProduct, String paymentService, String paymentId, Boolean tppExplicitAuthorisationPreferred, String tpPRedirectURI, String tpPNokRedirectURI) { return new PisPaymentCancellationRequest( PaymentType.getByValue(paymentService).orElseThrow(() -> new WrongPaymentTypeException(paymentService)), Optional.ofNullable(paymentProduct).orElseThrow(() -> new IllegalArgumentException("Unsupported payment product")), paymentId, BooleanUtils.isTrue(tppExplicitAuthorisationPreferred), tppRedirectUriMapper.mapToTppRedirectUri(tpPRedirectURI, tpPNokRedirectURI)); }  Object mapToGetPaymentResponse(CommonPayment commonPayment); PaymentInitiationStatusResponse200Json mapToStatusResponseJson(GetPaymentStatusResponse response); byte[] mapToStatusResponseRaw(GetPaymentStatusResponse response); PaymentInitationRequestResponse201 mapToPaymentInitiationResponse(PaymentInitiationResponse response); PaymentInitiationParameters mapToPaymentRequestParameters(String paymentProduct, String paymentService, byte[] tpPSignatureCertificate, String tpPRedirectURI,
                                                                     String tpPNokRedirectURI, boolean tppExplicitAuthorisationPreferred, PsuIdData psuData,
                                                                     TppNotificationData tppNotificationData, String tppBrandLoggingInformation, String instanceId); PisPaymentCancellationRequest mapToPaymentCancellationRequest(String paymentProduct, String paymentService, String paymentId,
                                                                         Boolean tppExplicitAuthorisationPreferred,
                                                                         String tpPRedirectURI, String tpPNokRedirectURI); PaymentInitiationCancelResponse202 mapToPaymentInitiationCancelResponse(CancelPaymentResponse cancelPaymentResponse);  }### Answer:
@Test void mapToPaymentCancellationRequest() { PisPaymentCancellationRequest actualPaymentCancellationRequest = mapper.mapToPaymentCancellationRequest(PAYMENT_PRODUCT, PaymentType.SINGLE.getValue(), PAYMENT_ID, Boolean.TRUE, "ok_url", "nok_url"); PisPaymentCancellationRequest expected = jsonReader.getObjectFromFile("json/service/mapper/payment-cancellation-request.json", PisPaymentCancellationRequest.class); assertEquals(expected, actualPaymentCancellationRequest); }