### Question:
LedgersSpiPaymentToMapper { public PaymentTO toPaymentTO_Bulk(SpiPaymentInfo spiPaymentInfo) { return Optional.ofNullable(spiPaymentInfo.getPaymentData()) .filter(ArrayUtils::isNotEmpty) .map(paymentData -> convert(paymentData, BulkPaymentInitiationJson.class)) .map(payment -> { PaymentTO paymentTO = new PaymentTO(); paymentTO.setPaymentId(spiPaymentInfo.getPaymentId()); paymentTO.setPaymentType(PaymentTypeTO.valueOf(spiPaymentInfo.getPaymentType().name())); paymentTO.setPaymentProduct(spiPaymentInfo.getPaymentProduct()); paymentTO.setDebtorAccount(mapToAccountReferenceTO(payment.getDebtorAccount())); paymentTO.setBatchBookingPreferred(payment.getBatchBookingPreferred()); paymentTO.setRequestedExecutionDate(payment.getRequestedExecutionDate()); paymentTO.setRequestedExecutionTime(Optional.ofNullable(payment.getRequestedExecutionTime()).map(OffsetDateTime::toLocalTime).orElse(null)); paymentTO.setTargets(payment.getPayments().stream() .map(bulk -> mapToPaymentTargetTO(bulk, spiPaymentInfo)) .collect(Collectors.toList())); return paymentTO; }) .orElse(null); }  PaymentTO toPaymentTO_Single(SpiPaymentInfo spiPaymentInfo); PaymentTO toPaymentTO_Bulk(SpiPaymentInfo spiPaymentInfo); PaymentTO toPaymentTO_Periodic(SpiPaymentInfo spiPaymentInfo);  }### Answer:
@Test void toPaymentTO_Bulk() { PaymentTO expectedResult = jsonReader.getObjectFromFile("json/mappers/payment-to-from-bulk-payment-Initiation.json", PaymentTO.class); SpiPaymentInfo spiPaymentInfo = jsonReader.getObjectFromFile("json/mappers/bulk-payment-initiation.json", SpiPaymentInfo.class); PaymentTO actualResult = ledgersSpiPaymentToMapper.toPaymentTO_Bulk(spiPaymentInfo); assertEquals(expectedResult, actualResult); }