### Question:
PaymentModelMapperPsd2 { public PaymentInitiationCancelResponse202 mapToPaymentInitiationCancelResponse(CancelPaymentResponse cancelPaymentResponse) { PaymentInitiationCancelResponse202 response = new PaymentInitiationCancelResponse202(); response.setTransactionStatus(mapToTransactionStatus(cancelPaymentResponse.getTransactionStatus())); response.setScaMethods(scaMethodsMapper.mapToScaMethods(cancelPaymentResponse.getScaMethods())); response.setChosenScaMethod(mapToChosenScaMethod(cancelPaymentResponse.getChosenScaMethod())); response.setChallengeData(coreObjectsMapper.mapToChallengeData(cancelPaymentResponse.getChallengeData())); response._links(hrefLinkMapper.mapToLinksMap(cancelPaymentResponse.getLinks())); response.setTppMessages(mapToTppMessage2XXList(cancelPaymentResponse.getTppMessageInformation())); return response; }  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 mapToPaymentInitiationCancelResponse() { CancelPaymentResponse cancelPaymentResponse = new CancelPaymentResponse(); cancelPaymentResponse.setTransactionStatus(TransactionStatus.CANC); de.adorsys.psd2.xs2a.core.authorisation.AuthenticationObject authenticationObjec = new de.adorsys.psd2.xs2a.core.authorisation.AuthenticationObject(); authenticationObjec.setAuthenticationMethodId("authenticationMethodId"); authenticationObjec.setAuthenticationType("authenticationType"); authenticationObjec.setAuthenticationVersion("authenticationVersion"); authenticationObjec.setName("name123"); cancelPaymentResponse.setScaMethods(Collections.singletonList(authenticationObjec)); Xs2aChosenScaMethod chosenScaMethod = new Xs2aChosenScaMethod(); chosenScaMethod.setAuthenticationMethodId("authenticationMethodId1"); chosenScaMethod.setAuthenticationType("authenticationType"); cancelPaymentResponse.setChosenScaMethod(chosenScaMethod); cancelPaymentResponse.setLinks(null); PaymentInitiationCancelResponse202 actual = mapper.mapToPaymentInitiationCancelResponse(cancelPaymentResponse); PaymentInitiationCancelResponse202 expected = new PaymentInitiationCancelResponse202(); expected.setTransactionStatus(de.adorsys.psd2.model.TransactionStatus.CANC); ScaMethods scaMethods = new ScaMethods(); AuthenticationObject authenticationObject = new AuthenticationObject(); authenticationObject.setAuthenticationMethodId("authenticationMethodId"); authenticationObject.setAuthenticationType("authenticationType"); authenticationObject.setAuthenticationVersion("authenticationVersion"); authenticationObject.setName("name123"); scaMethods.add(authenticationObject); expected.setScaMethods(scaMethods); ChosenScaMethod expectedChosenScaMethod = new ChosenScaMethod(); expectedChosenScaMethod.setAuthenticationMethodId("authenticationMethodId1"); expectedChosenScaMethod.setAuthenticationType("authenticationType"); expected.setChosenScaMethod(expectedChosenScaMethod); expected.setLinks(null); assertEquals(expected, actual); }