### Question:
Xs2aToCmsPisCommonPaymentRequestMapper { public PisPaymentInfo mapToPisPaymentInfo(PisPaymentInfoCreationObject creationObject) { PaymentInitiationParameters paymentInitiationParameters = creationObject.getPaymentInitiationParameters(); PaymentInitiationResponse response = creationObject.getResponse(); PisPaymentInfo paymentInfo = new PisPaymentInfo(); paymentInfo.setPaymentProduct(paymentInitiationParameters.getPaymentProduct()); paymentInfo.setPaymentType(paymentInitiationParameters.getPaymentType()); paymentInfo.setTransactionStatus(response.getTransactionStatus()); paymentInfo.setTppInfo(creationObject.getTppInfo()); paymentInfo.setPaymentId(response.getPaymentId()); paymentInfo.setPsuDataList(Collections.singletonList(paymentInitiationParameters.getPsuData())); paymentInfo.setMultilevelScaRequired(response.isMultilevelScaRequired()); paymentInfo.setAspspAccountId(response.getAspspAccountId()); paymentInfo.setTppRedirectUri(paymentInitiationParameters.getTppRedirectUri()); paymentInfo.setInternalRequestId(creationObject.getInternalRequestId()); paymentInfo.setPaymentData(creationObject.getPaymentData()); paymentInfo.setCreationTimestamp(creationObject.getCreationTimestamp()); paymentInfo.setTppNotificationUri(Optional.ofNullable(paymentInitiationParameters.getTppNotificationData()) .map(TppNotificationData::getTppNotificationUri) .orElse(null)); paymentInfo.setNotificationSupportedModes(Optional.ofNullable(paymentInitiationParameters.getTppNotificationData()) .map(TppNotificationData::getNotificationModes) .orElse(Collections.emptyList())); paymentInfo.setContentType(creationObject.getContentType()); paymentInfo.setTppBrandLoggingInformation(paymentInitiationParameters.getTppBrandLoggingInformation()); paymentInfo.setInstanceId(paymentInitiationParameters.getInstanceId()); return paymentInfo; }  PisPaymentInfo mapToPisPaymentInfo(PisPaymentInfoCreationObject creationObject);  }### Answer:
@Test void mapToPisPaymentInfo() { PaymentInitiationParameters paymentInitiationParameters = jsonReader.getObjectFromFile("json/service/mapper/spi_xs2a_mappers/payment-initiation-parameters.json", PaymentInitiationParameters.class); TppInfo tppInfo = jsonReader.getObjectFromFile("json/service/mapper/spi_xs2a_mappers/tpp-info.json", TppInfo.class); PaymentInitiationResponse response = jsonReader.getObjectFromFile("json/service/mapper/spi_xs2a_mappers/payment-initiation-response.json", SinglePaymentInitiationResponse.class); PisPaymentInfo expected = jsonReader.getObjectFromFile("json/service/mapper/spi_xs2a_mappers/pis-payment-info.json", PisPaymentInfo.class); expected.setPaymentData(PAYMENT_DATA); expected.setStatusChangeTimestamp(null); PisPaymentInfoCreationObject creationObject = new PisPaymentInfoCreationObject(paymentInitiationParameters, tppInfo, response, PAYMENT_DATA, null, expected.getCreationTimestamp(), expected.getContentType()); PisPaymentInfo actual = xs2aToCmsPisCommonPaymentRequestMapper.mapToPisPaymentInfo(creationObject); assertEquals(expected, actual); }