### Question:
Xs2aPisCommonPaymentMapper { public SpiScaConfirmation buildSpiScaConfirmation(Xs2aUpdatePisCommonPaymentPsuDataRequest request, String consentId, String paymentId, PsuIdData psuData) { SpiScaConfirmation paymentConfirmation = new SpiScaConfirmation(); paymentConfirmation.setPaymentId(paymentId); paymentConfirmation.setTanNumber(request.getScaAuthenticationData()); paymentConfirmation.setConsentId(consentId); paymentConfirmation.setPsuId(Optional.ofNullable(psuData).map(PsuIdData::getPsuId).orElse(null)); return paymentConfirmation; }  Optional<Xs2aCreatePisAuthorisationResponse> mapToXsa2CreatePisAuthorisationResponse(CreateAuthorisationResponse response, PaymentType paymentType); Optional<Xs2aCreatePisCancellationAuthorisationResponse> mapToXs2aCreatePisCancellationAuthorisationResponse(CreateAuthorisationResponse response, PaymentType paymentType); Xs2aPisCommonPayment mapToXs2aPisCommonPayment(CreatePisCommonPaymentResponse response, PsuIdData psuData); UpdateAuthorisationRequest mapToUpdateAuthorisationRequest(AuthorisationProcessorResponse response, AuthorisationType authorisationType); SpiScaConfirmation buildSpiScaConfirmation(Xs2aUpdatePisCommonPaymentPsuDataRequest request, String consentId, String paymentId, PsuIdData psuData);  }### Answer:
@Test void buildSpiScaConfirmation() { SpiScaConfirmation expected = jsonReader.getObjectFromFile("json/service/mapper/spi_xs2a_mappers/spi-sca-confirmation.json", SpiScaConfirmation.class); Xs2aUpdatePisCommonPaymentPsuDataRequest request = jsonReader.getObjectFromFile("json/service/mapper/spi_xs2a_mappers/xs2a-update-pis-common-payment-psu-data-request.json", Xs2aUpdatePisCommonPaymentPsuDataRequest.class); String consentId = "consentId"; String paymentId = "paymentId"; SpiScaConfirmation actual = xs2aPisCommonPaymentMapper.buildSpiScaConfirmation(request, consentId, paymentId, psuData); assertEquals(expected, actual); }