From 773f38234e4f5e0fa078f0bf08b57f30c23d8688 Mon Sep 17 00:00:00 2001 From: silvanotamburini Date: Thu, 2 Jan 2025 17:11:26 +0100 Subject: [PATCH 1/2] feat: P4ADEV-1633 classify-iuv-activity-retrieve-tes-iuf (#66) --- .../IufClassificationActivityImpl.java | 4 +- .../TransferClassificationActivityImpl.java | 12 ++- .../payhub/activities/dao/TreasuryDao.java | 17 ++++ .../PaymentsReportingDTO.java | 6 +- .../activities/dto/treasury/TreasuryDTO.java | 59 ++++++++++++++ .../PaymentsReportingMapperService.java | 6 +- .../IufClassificationActivityTest.java | 4 +- ...ransferClassificationActivityImplTest.java | 79 ++++++++++++++++++- ...tingIngestionFlowFileActivityImplTest.java | 6 +- .../PaymentsReportingMapperServiceTest.java | 6 +- .../utility/faker/PaymentsReportingFaker.java | 5 +- version | 2 +- 12 files changed, 184 insertions(+), 22 deletions(-) create mode 100644 src/main/java/it/gov/pagopa/payhub/activities/dao/TreasuryDao.java create mode 100644 src/main/java/it/gov/pagopa/payhub/activities/dto/treasury/TreasuryDTO.java diff --git a/src/main/java/it/gov/pagopa/payhub/activities/activity/classifications/IufClassificationActivityImpl.java b/src/main/java/it/gov/pagopa/payhub/activities/activity/classifications/IufClassificationActivityImpl.java index fdffcf65..a925054c 100644 --- a/src/main/java/it/gov/pagopa/payhub/activities/activity/classifications/IufClassificationActivityImpl.java +++ b/src/main/java/it/gov/pagopa/payhub/activities/activity/classifications/IufClassificationActivityImpl.java @@ -33,8 +33,8 @@ public IufClassificationActivityResult classify(Long organizationId, Long treasu .stream() .map(paymentsReportingDTO -> Transfer2ClassifyDTO.builder() - .iuv(paymentsReportingDTO.getCreditorReferenceId()) - .iur(paymentsReportingDTO.getRegulationUniqueIdentifier()) + .iuv(paymentsReportingDTO.getIuv()) + .iur(paymentsReportingDTO.getIur()) .transferIndex(paymentsReportingDTO.getTransferIndex()) .build()) .toList(); diff --git a/src/main/java/it/gov/pagopa/payhub/activities/activity/classifications/TransferClassificationActivityImpl.java b/src/main/java/it/gov/pagopa/payhub/activities/activity/classifications/TransferClassificationActivityImpl.java index d4dbf240..52cd300b 100644 --- a/src/main/java/it/gov/pagopa/payhub/activities/activity/classifications/TransferClassificationActivityImpl.java +++ b/src/main/java/it/gov/pagopa/payhub/activities/activity/classifications/TransferClassificationActivityImpl.java @@ -3,9 +3,11 @@ import it.gov.pagopa.payhub.activities.dao.ClassificationDao; import it.gov.pagopa.payhub.activities.dao.PaymentsReportingDao; import it.gov.pagopa.payhub.activities.dao.TransferDao; +import it.gov.pagopa.payhub.activities.dao.TreasuryDao; import it.gov.pagopa.payhub.activities.dto.paymentsreporting.PaymentsReportingDTO; import it.gov.pagopa.payhub.activities.exception.ClassificationException; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Component; @@ -16,13 +18,16 @@ public class TransferClassificationActivityImpl implements TransferClassificatio private final ClassificationDao classificationDao; private final TransferDao transferDao; private final PaymentsReportingDao paymentsReportingDao; + private final TreasuryDao treasuryDao; public TransferClassificationActivityImpl(ClassificationDao classificationDao, TransferDao transferDao, - PaymentsReportingDao paymentsReportingDao) { + PaymentsReportingDao paymentsReportingDao, + TreasuryDao treasuryDao) { this.classificationDao = classificationDao; this.transferDao = transferDao; this.paymentsReportingDao = paymentsReportingDao; + this.treasuryDao = treasuryDao; } @Override @@ -35,5 +40,10 @@ public void classify(Long orgId, String iuv, String iur, int transferIndex) { log.info("Retrieve payment reporting for organization id: {} and iuv: {} and iur {} and transfer index: {}", orgId, iuv, iur, transferIndex); PaymentsReportingDTO paymentsReportingDTO = paymentsReportingDao.findBySemanticKey(orgId, iuv, iur, transferIndex); + if (paymentsReportingDTO!=null) { + String iuf = paymentsReportingDTO.getIuf(); + log.info("Retrieve treasury for organization id: {} and iuf {}", orgId, iuf); + treasuryDao.getByOrganizationIdAndIuf(orgId, iuf); + } } } diff --git a/src/main/java/it/gov/pagopa/payhub/activities/dao/TreasuryDao.java b/src/main/java/it/gov/pagopa/payhub/activities/dao/TreasuryDao.java new file mode 100644 index 00000000..ffa612b8 --- /dev/null +++ b/src/main/java/it/gov/pagopa/payhub/activities/dao/TreasuryDao.java @@ -0,0 +1,17 @@ +package it.gov.pagopa.payhub.activities.dao; + +import it.gov.pagopa.payhub.activities.dto.treasury.TreasuryDTO; + + +public interface TreasuryDao { + + /** + * search for treasury of a specific organization associated to a payment reporting identifier + * + * @param organizationId organization id + * @param iuf payment reporting identifier + * @return TreasuryDTO object containing treasury data + */ + TreasuryDTO getByOrganizationIdAndIuf(Long organizationId, String iuf); + +} diff --git a/src/main/java/it/gov/pagopa/payhub/activities/dto/paymentsreporting/PaymentsReportingDTO.java b/src/main/java/it/gov/pagopa/payhub/activities/dto/paymentsreporting/PaymentsReportingDTO.java index 7f2d194d..17a7f2e5 100644 --- a/src/main/java/it/gov/pagopa/payhub/activities/dto/paymentsreporting/PaymentsReportingDTO.java +++ b/src/main/java/it/gov/pagopa/payhub/activities/dto/paymentsreporting/PaymentsReportingDTO.java @@ -22,7 +22,7 @@ public class PaymentsReportingDTO { private Long organizationId; private Long ingestionFlowFileId; private String pspIdentifier; - private String flowIdentifierCode; + private String iuf; private LocalDateTime flowDateTime; private String regulationUniqueIdentifier; private LocalDate regulationDate; @@ -34,8 +34,8 @@ public class PaymentsReportingDTO { private String receiverOrganizationName; private long totalPayments; private Long totalAmountCents; - private String creditorReferenceId; - private String regulationId; + private String iuv; + private String iur; private Long amountPaidCents; private String paymentOutcomeCode; private LocalDate payDate; diff --git a/src/main/java/it/gov/pagopa/payhub/activities/dto/treasury/TreasuryDTO.java b/src/main/java/it/gov/pagopa/payhub/activities/dto/treasury/TreasuryDTO.java new file mode 100644 index 00000000..addd71f0 --- /dev/null +++ b/src/main/java/it/gov/pagopa/payhub/activities/dto/treasury/TreasuryDTO.java @@ -0,0 +1,59 @@ +package it.gov.pagopa.payhub.activities.dto.treasury; + +import lombok.*; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * DTO for the TreasuryDto + */ +@Data +@Builder(toBuilder = true) +@NoArgsConstructor +@AllArgsConstructor +public class TreasuryDTO { + private Long treasuryId; + private String billYear; + private String billCode; + private String accountCode; + private String domainIdCode; + private String transactionTypeCode; + private String remittanceCode; + private String remittanceInformation; + private BigDecimal billIpNumber; + private Date billDate; + private Date receptionDate; + private String documentYear; + private String documentCode; + private String sealCode; + private String lastName; + private String firstName; + private String address; + private String postalCode; + private String city; + private String fiscalCode; + private String vatNumber; + private String abiCode; + private String cabCode; + private String accountRegistryCode; + private String provisionalAe; + private String provisionalCode; + private String ibanCode; + private Character accountTypeCode; + private String processCode; + private String executionPgCode; + private String transferPgCode; + private Long processPgNumber; + private Date regionValueDate; + private Long organizationId; + private String iuf; + private String iuv; + private Date creationDate; + private Date lastUpdateDate; + private boolean isRegularized; + private Long ingestionFlowFileId; + private Date actualSuspensionDate; + private String managementProvisionalCode; + private String endToEndId; +} diff --git a/src/main/java/it/gov/pagopa/payhub/activities/service/paymentsreporting/PaymentsReportingMapperService.java b/src/main/java/it/gov/pagopa/payhub/activities/service/paymentsreporting/PaymentsReportingMapperService.java index b07ec0ee..7615c3c5 100644 --- a/src/main/java/it/gov/pagopa/payhub/activities/service/paymentsreporting/PaymentsReportingMapperService.java +++ b/src/main/java/it/gov/pagopa/payhub/activities/service/paymentsreporting/PaymentsReportingMapperService.java @@ -36,7 +36,7 @@ public List mapToDtoList(CtFlussoRiversamento ctFlussoRive .organizationId(ingestionFlowFileDTO.getOrg().getOrgId()) .ingestionFlowFileId(ingestionFlowFileDTO.getIngestionFlowFileId()) .pspIdentifier(ctFlussoRiversamento.getIstitutoMittente().getDenominazioneMittente()) - .flowIdentifierCode(ctFlussoRiversamento.getIdentificativoFlusso()) + .iuf(ctFlussoRiversamento.getIdentificativoFlusso()) .flowDateTime(ctFlussoRiversamento.getDataOraFlusso().toGregorianCalendar().toZonedDateTime().toLocalDateTime()) .regulationUniqueIdentifier(ctFlussoRiversamento.getIdentificativoUnivocoRegolamento()) .regulationDate(ctFlussoRiversamento.getDataRegolamento().toGregorianCalendar().toZonedDateTime().toLocalDate()) @@ -52,8 +52,8 @@ public List mapToDtoList(CtFlussoRiversamento ctFlussoRive return ctFlussoRiversamento.getDatiSingoliPagamenti().stream() .map(item -> builder - .creditorReferenceId(item.getIdentificativoUnivocoVersamento()) - .regulationId(item.getIdentificativoUnivocoRiscossione()) + .iuv(item.getIdentificativoUnivocoVersamento()) + .iur(item.getIdentificativoUnivocoRiscossione()) .transferIndex(item.getIndiceDatiSingoloPagamento()) .amountPaidCents(item.getSingoloImportoPagato().movePointRight(2).longValueExact()) .paymentOutcomeCode(item.getCodiceEsitoSingoloPagamento()) diff --git a/src/test/java/it/gov/pagopa/payhub/activities/activity/classifications/IufClassificationActivityTest.java b/src/test/java/it/gov/pagopa/payhub/activities/activity/classifications/IufClassificationActivityTest.java index b71ddbd9..43a85c66 100644 --- a/src/test/java/it/gov/pagopa/payhub/activities/activity/classifications/IufClassificationActivityTest.java +++ b/src/test/java/it/gov/pagopa/payhub/activities/activity/classifications/IufClassificationActivityTest.java @@ -59,8 +59,8 @@ void givenReportedTransferWhenClassifyThenOk() { .stream() .map(paymentsReportingDTO -> Transfer2ClassifyDTO.builder() - .iuv(paymentsReportingDTO.getCreditorReferenceId()) - .iur(paymentsReportingDTO.getRegulationUniqueIdentifier()) + .iuv(paymentsReportingDTO.getIuv()) + .iur(paymentsReportingDTO.getIur()) .transferIndex(paymentsReportingDTO.getTransferIndex()) .build()) .toList(); diff --git a/src/test/java/it/gov/pagopa/payhub/activities/activity/classifications/TransferClassificationActivityImplTest.java b/src/test/java/it/gov/pagopa/payhub/activities/activity/classifications/TransferClassificationActivityImplTest.java index 79ba3dc1..16103f71 100644 --- a/src/test/java/it/gov/pagopa/payhub/activities/activity/classifications/TransferClassificationActivityImplTest.java +++ b/src/test/java/it/gov/pagopa/payhub/activities/activity/classifications/TransferClassificationActivityImplTest.java @@ -3,13 +3,18 @@ import it.gov.pagopa.payhub.activities.dao.ClassificationDao; import it.gov.pagopa.payhub.activities.dao.PaymentsReportingDao; import it.gov.pagopa.payhub.activities.dao.TransferDao; +import it.gov.pagopa.payhub.activities.dao.TreasuryDao; import it.gov.pagopa.payhub.activities.dto.TransferDTO; import it.gov.pagopa.payhub.activities.dto.paymentsreporting.PaymentsReportingDTO; +import it.gov.pagopa.payhub.activities.dto.treasury.TreasuryDTO; import it.gov.pagopa.payhub.activities.exception.ClassificationException; +import it.gov.pagopa.payhub.activities.utility.faker.PaymentsReportingFaker; +import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; +import org.mockito.Mockito; import org.mockito.junit.jupiter.MockitoExtension; import static org.junit.jupiter.api.Assertions.*; @@ -20,6 +25,7 @@ class TransferClassificationActivityImplTest { private static final Long ORGANIZATION = 123L; private static final String IUV = "01011112222333345"; private static final String IUR = "IUR"; + private static final String IUF = "IUF"; private static final int INDEX = 1; @Mock @@ -31,25 +37,48 @@ class TransferClassificationActivityImplTest { @Mock private PaymentsReportingDao paymentsReportingDaoMock; + @Mock + private TreasuryDao treasuryDaoMock; + private TransferClassificationActivity activity; @BeforeEach void setUp() { - activity = new TransferClassificationActivityImpl(classificationDaoMock, transferDaoMock, paymentsReportingDaoMock); + activity = new TransferClassificationActivityImpl( + classificationDaoMock, transferDaoMock, paymentsReportingDaoMock, treasuryDaoMock); + } + + @AfterEach + void verifyNoMoreInteractions(){ + Mockito.verifyNoMoreInteractions( + classificationDaoMock, transferDaoMock, paymentsReportingDaoMock, treasuryDaoMock); } @Test void classificationSuccess() { + PaymentsReportingDTO paymentsReportingDTO = PaymentsReportingFaker.buildClassifyResultDTO(); when(classificationDaoMock.deleteTransferClassification(ORGANIZATION, IUV, IUR, INDEX)).thenReturn(Boolean.TRUE); when(transferDaoMock.findBySemanticKey(ORGANIZATION, IUV, IUR, INDEX)).thenReturn(new TransferDTO()); - when(paymentsReportingDaoMock.findBySemanticKey(ORGANIZATION, IUV, IUR, INDEX)).thenReturn(new PaymentsReportingDTO()); + when(paymentsReportingDaoMock.findBySemanticKey(ORGANIZATION, IUV, IUR, INDEX)).thenReturn(paymentsReportingDTO); + when(treasuryDaoMock.getByOrganizationIdAndIuf(ORGANIZATION, IUF)).thenReturn(new TreasuryDTO()); + assertDoesNotThrow(() -> activity.classify(ORGANIZATION, IUV, IUR, INDEX)); + + Mockito.verify(classificationDaoMock, Mockito.times(1)).deleteTransferClassification(ORGANIZATION, IUV, IUR, INDEX); + Mockito.verify(transferDaoMock, Mockito.times(1)).findBySemanticKey(ORGANIZATION, IUV, IUR, INDEX); + Mockito.verify(paymentsReportingDaoMock, Mockito.times(1)).findBySemanticKey(ORGANIZATION, IUV, IUR, INDEX); + Mockito.verify(treasuryDaoMock, Mockito.times(1)).getByOrganizationIdAndIuf(ORGANIZATION, IUF); } @Test void givenFailedDeletePreviousClassificationWhenClassifyThenClassificationFailed() { when(classificationDaoMock.deleteTransferClassification(ORGANIZATION, IUV, IUR, INDEX)).thenReturn(Boolean.FALSE); assertThrows(ClassificationException.class, () -> activity.classify(ORGANIZATION, IUV, IUR, INDEX), "classification failed"); + + Mockito.verify(classificationDaoMock, Mockito.times(1)).deleteTransferClassification(ORGANIZATION, IUV, IUR, INDEX); + Mockito.verify(transferDaoMock, Mockito.times(0)).findBySemanticKey(ORGANIZATION, IUV, IUR, INDEX); + Mockito.verify(paymentsReportingDaoMock, Mockito.times(0)).findBySemanticKey(ORGANIZATION, IUV, IUR, INDEX); + Mockito.verify(treasuryDaoMock, Mockito.times(0)).getByOrganizationIdAndIuf(ORGANIZATION, IUF); } @Test @@ -57,6 +86,52 @@ void givenFailedFindTransferWhenClassifyThenClassificationFailed() { when(classificationDaoMock.deleteTransferClassification(ORGANIZATION, IUV, IUR, INDEX)).thenReturn(Boolean.TRUE); when(transferDaoMock.findBySemanticKey(ORGANIZATION, IUV, IUR, INDEX)).thenThrow(new ClassificationException("retrieving failed")); assertThrows(ClassificationException.class, () -> activity.classify(ORGANIZATION, IUV, IUR, INDEX), "classification failed"); + + Mockito.verify(classificationDaoMock, Mockito.times(1)).deleteTransferClassification(ORGANIZATION, IUV, IUR, INDEX); + Mockito.verify(transferDaoMock, Mockito.times(1)).findBySemanticKey(ORGANIZATION, IUV, IUR, INDEX); + Mockito.verify(paymentsReportingDaoMock, Mockito.times(0)).findBySemanticKey(ORGANIZATION, IUV, IUR, INDEX); + Mockito.verify(treasuryDaoMock, Mockito.times(0)).getByOrganizationIdAndIuf(ORGANIZATION, IUF); + } + + @Test + void givenFailedFindPaymentsReportingWhenClassifyThenClassificationFailed() { + when(classificationDaoMock.deleteTransferClassification(ORGANIZATION, IUV, IUR, INDEX)).thenReturn(Boolean.TRUE); + when(transferDaoMock.findBySemanticKey(ORGANIZATION, IUV, IUR, INDEX)).thenReturn(new TransferDTO()); + when(paymentsReportingDaoMock.findBySemanticKey(ORGANIZATION, IUV, IUR, INDEX)).thenThrow(new ClassificationException("payments reporting find failed")); + assertThrows(ClassificationException.class, () -> activity.classify(ORGANIZATION, IUV, IUR, INDEX), "classification failed"); + + Mockito.verify(classificationDaoMock, Mockito.times(1)).deleteTransferClassification(ORGANIZATION, IUV, IUR, INDEX); + Mockito.verify(transferDaoMock, Mockito.times(1)).findBySemanticKey(ORGANIZATION, IUV, IUR, INDEX); + Mockito.verify(paymentsReportingDaoMock, Mockito.times(1)).findBySemanticKey(ORGANIZATION, IUV, IUR, INDEX); + Mockito.verify(treasuryDaoMock, Mockito.times(0)).getByOrganizationIdAndIuf(ORGANIZATION, IUF); + } + + @Test + void whenPaymentsReportingDTOIsNullShouldNotCallTreasury() { + when(classificationDaoMock.deleteTransferClassification(ORGANIZATION, IUV, IUR, INDEX)).thenReturn(Boolean.TRUE); + when(transferDaoMock.findBySemanticKey(ORGANIZATION, IUV, IUR, INDEX)).thenReturn(new TransferDTO()); + when(paymentsReportingDaoMock.findBySemanticKey(ORGANIZATION, IUV, IUR, INDEX)).thenReturn(null); + assertDoesNotThrow(() -> activity.classify(ORGANIZATION, IUV, IUR, INDEX)); + + Mockito.verify(classificationDaoMock, Mockito.times(1)).deleteTransferClassification(ORGANIZATION, IUV, IUR, INDEX); + Mockito.verify(transferDaoMock, Mockito.times(1)).findBySemanticKey(ORGANIZATION, IUV, IUR, INDEX); + Mockito.verify(paymentsReportingDaoMock, Mockito.times(1)).findBySemanticKey(ORGANIZATION, IUV, IUR, INDEX); + Mockito.verify(treasuryDaoMock, Mockito.times(0)).getByOrganizationIdAndIuf(ORGANIZATION, IUF); + } + + @Test + void givenFailedFindTreasuryWhenClassifyThenClassificationFailed() { + PaymentsReportingDTO paymentsReportingDTO = PaymentsReportingFaker.buildClassifyResultDTO(); + when(classificationDaoMock.deleteTransferClassification(ORGANIZATION, IUV, IUR, INDEX)).thenReturn(Boolean.TRUE); + when(transferDaoMock.findBySemanticKey(ORGANIZATION, IUV, IUR, INDEX)).thenReturn(new TransferDTO()); + when(paymentsReportingDaoMock.findBySemanticKey(ORGANIZATION, IUV, IUR, INDEX)).thenReturn(paymentsReportingDTO); + when(treasuryDaoMock.getByOrganizationIdAndIuf(ORGANIZATION, IUF)).thenThrow(new ClassificationException("treasury find failed")); + assertThrows(ClassificationException.class, () -> activity.classify(ORGANIZATION, IUV, IUR, INDEX), "classification failed"); + + Mockito.verify(classificationDaoMock, Mockito.times(1)).deleteTransferClassification(ORGANIZATION, IUV, IUR, INDEX); + Mockito.verify(transferDaoMock, Mockito.times(1)).findBySemanticKey(ORGANIZATION, IUV, IUR, INDEX); + Mockito.verify(paymentsReportingDaoMock, Mockito.times(1)).findBySemanticKey(ORGANIZATION, IUV, IUR, INDEX); + Mockito.verify(treasuryDaoMock, Mockito.times(1)).getByOrganizationIdAndIuf(ORGANIZATION, IUF); } } diff --git a/src/test/java/it/gov/pagopa/payhub/activities/activity/paymentsreporting/PaymentsReportingIngestionFlowFileActivityImplTest.java b/src/test/java/it/gov/pagopa/payhub/activities/activity/paymentsreporting/PaymentsReportingIngestionFlowFileActivityImplTest.java index 83071c5f..13ebb2ba 100644 --- a/src/test/java/it/gov/pagopa/payhub/activities/activity/paymentsreporting/PaymentsReportingIngestionFlowFileActivityImplTest.java +++ b/src/test/java/it/gov/pagopa/payhub/activities/activity/paymentsreporting/PaymentsReportingIngestionFlowFileActivityImplTest.java @@ -95,7 +95,7 @@ void givenSuccessfullConditionsWhenProcessFileThenOk() throws IOException { Path filePath = Files.createFile(Path.of(mockFlowDTO.getFilePathName()).resolve(mockFlowDTO.getFileName())); List mockedListPath = List.of(filePath); ctFlussoRiversamento.setIdentificativoFlusso("idFlow"); - List dtoList = List.of(PaymentsReportingDTO.builder().flowIdentifierCode("idFlow").build()); + List dtoList = List.of(PaymentsReportingDTO.builder().iuf("idFlow").build()); PaymentsReportingIngestionFlowFileActivityResult expected = new PaymentsReportingIngestionFlowFileActivityResult(List.of(ctFlussoRiversamento.getIdentificativoFlusso()), true, null); @@ -248,7 +248,7 @@ void givenPaymentsReportingExceptionWhenProcessFileThenFails() throws Exception List mockedListPath = List.of(filePath); ctFlussoRiversamento = new CtFlussoRiversamento(); ctFlussoRiversamento.setIdentificativoFlusso("idFlow"); - List dtoList = List.of(PaymentsReportingDTO.builder().flowIdentifierCode("idFlow").build()); + List dtoList = List.of(PaymentsReportingDTO.builder().iuf("idFlow").build()); PaymentsReportingIngestionFlowFileActivityResult expected = new PaymentsReportingIngestionFlowFileActivityResult(Collections.emptyList(), false, "saving fails"); @@ -283,7 +283,7 @@ void givenIOExceptionWhenProcessFileThenFails() throws IOException { List mockedListPath = List.of(filePath); ctFlussoRiversamento = new CtFlussoRiversamento(); ctFlussoRiversamento.setIdentificativoFlusso("idFlow"); - List dtoList = List.of(PaymentsReportingDTO.builder().flowIdentifierCode("idFlow").build()); + List dtoList = List.of(PaymentsReportingDTO.builder().iuf("idFlow").build()); PaymentsReportingIngestionFlowFileActivityResult expected = new PaymentsReportingIngestionFlowFileActivityResult(Collections.emptyList(), false, "error occured"); diff --git a/src/test/java/it/gov/pagopa/payhub/activities/service/paymentsreporting/PaymentsReportingMapperServiceTest.java b/src/test/java/it/gov/pagopa/payhub/activities/service/paymentsreporting/PaymentsReportingMapperServiceTest.java index 972117fd..da5428d4 100644 --- a/src/test/java/it/gov/pagopa/payhub/activities/service/paymentsreporting/PaymentsReportingMapperServiceTest.java +++ b/src/test/java/it/gov/pagopa/payhub/activities/service/paymentsreporting/PaymentsReportingMapperServiceTest.java @@ -76,13 +76,13 @@ void testMapper() throws DatatypeConfigurationException { PaymentsReportingDTO firstDTO = result.getFirst(); // Then assertEquals(1, result.size()); - assertEquals("flow123", firstDTO.getFlowIdentifierCode()); + assertEquals("flow123", firstDTO.getIuf()); assertEquals("PSP Mittente", firstDTO.getSenderPspName()); assertEquals("Org Ricevente", firstDTO.getReceiverOrganizationName()); assertEquals(1L, firstDTO.getTotalPayments()); assertEquals(100_050L, firstDTO.getTotalAmountCents()); - assertEquals("vers123", firstDTO.getCreditorReferenceId()); - assertEquals("ris123", firstDTO.getRegulationId()); + assertEquals("vers123", firstDTO.getIuv()); + assertEquals("ris123", firstDTO.getIur()); assertEquals(1, firstDTO.getTransferIndex()); assertEquals(20_000L, firstDTO.getAmountPaidCents()); assertEquals("OK", firstDTO.getPaymentOutcomeCode()); diff --git a/src/test/java/it/gov/pagopa/payhub/activities/utility/faker/PaymentsReportingFaker.java b/src/test/java/it/gov/pagopa/payhub/activities/utility/faker/PaymentsReportingFaker.java index af52b1a5..b782caa4 100644 --- a/src/test/java/it/gov/pagopa/payhub/activities/utility/faker/PaymentsReportingFaker.java +++ b/src/test/java/it/gov/pagopa/payhub/activities/utility/faker/PaymentsReportingFaker.java @@ -7,8 +7,9 @@ public class PaymentsReportingFaker { public static PaymentsReportingDTO buildClassifyResultDTO(){ return PaymentsReportingDTO.builder() .organizationId(1L) - .creditorReferenceId("IUV") - .regulationUniqueIdentifier("IUR") + .iuf("IUF") + .iuv("IUV") + .iur("IUR") .transferIndex(1) .build(); } diff --git a/version b/version index 27ddcc14..4a04d43f 100644 --- a/version +++ b/version @@ -1 +1 @@ -1.23.4 +1.23.11t add .-SNAPSHOT \ No newline at end of file From 5a8d875baa607a67a974ecc6d2a6527be494b585 Mon Sep 17 00:00:00 2001 From: p4pa-pagopa-github-bot Date: Thu, 2 Jan 2025 16:11:57 +0000 Subject: [PATCH 2/2] Bump version --- version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version b/version index 4a04d43f..53cc1a6f 100644 --- a/version +++ b/version @@ -1 +1 @@ -1.23.11t add .-SNAPSHOT \ No newline at end of file +1.24.0