### Question:
Xs2aToSpiPaymentInfoMapper { public SpiPaymentInfo mapToSpiPaymentInfo(CommonPayment commonPayment) { SpiPaymentInfo info = new SpiPaymentInfo(commonPayment.getPaymentProduct()); info.setPaymentId(commonPayment.getPaymentId()); info.setPaymentType(commonPayment.getPaymentType()); info.setStatus(commonPayment.getTransactionStatus()); info.setPaymentData(commonPayment.getPaymentData()); info.setPsuDataList(xs2aToSpiPsuDataMapper.mapToSpiPsuDataList(commonPayment.getPsuDataList())); info.setStatusChangeTimestamp(commonPayment.getStatusChangeTimestamp()); info.setCreationTimestamp(commonPayment.getCreationTimestamp()); info.setContentType(commonPayment.getContentType()); info.setInstanceId(commonPayment.getInstanceId()); return info; }  SpiPaymentInfo mapToSpiPaymentInfo(CommonPayment commonPayment); SpiPaymentInfo mapToSpiPaymentInfo(CommonPaymentData commonPaymentData);  }### Answer:
@Test void mapToSpiPaymentInfoSuccess() { CommonPayment commonPayment = buildCommonPayment(); when(xs2aToSpiPsuDataMapper.mapToSpiPsuDataList(psuDataList)).thenReturn(spiPsuDataList); SpiPaymentInfo spiPaymentInfo = xs2aToSpiPaymentInfoMapper.mapToSpiPaymentInfo(commonPayment); SpiPaymentInfo spiPaymentInfoExpected = buildSpiPaymentInfo(); Assertions.assertThat(spiPaymentInfo).isEqualToComparingFieldByFieldRecursively(spiPaymentInfoExpected); }
@Test void mapToSpiPaymentInfo_CommonPaymentData_Success() { CommonPaymentData commonPaymentData = buildCommonPaymentData(); when(xs2aToSpiPsuDataMapper.mapToSpiPsuDataList(psuDataList)).thenReturn(spiPsuDataList); SpiPaymentInfo spiPaymentInfo = xs2aToSpiPaymentInfoMapper.mapToSpiPaymentInfo(commonPaymentData); SpiPaymentInfo spiPaymentInfoExpected = buildSpiPaymentInfo(); Assertions.assertThat(spiPaymentInfo).isEqualToComparingFieldByFieldRecursively(spiPaymentInfoExpected); }