Search in sources :

Example 11 with ParsedRecord

use of org.folio.ParsedRecord in project mod-source-record-manager by folio-org.

the class ImportInvoiceJournalConsumerVerticleMockTest method shouldProcessInvoiceErrorWithoutInvoiceLineOrderEvent.

@Test
public void shouldProcessInvoiceErrorWithoutInvoiceLineOrderEvent(TestContext context) throws IOException {
    Async async = context.async();
    // given
    HashMap<String, String> payloadContext = new HashMap<>();
    Record record = new Record().withId(UUID.randomUUID().toString()).withParsedRecord(new ParsedRecord().withContent(EDIFACT_PARSED_CONTENT));
    payloadContext.put(EDIFACT_INVOICE.value(), Json.encode(record));
    payloadContext.put(INVOICE.value(), Json.encode(INVOICE_JSON));
    payloadContext.put(INVOICE_LINES_KEY, Json.encode(INVOICE_LINES_JSON));
    payloadContext.put(INVOICE_LINES_ERRORS_KEY, Json.encode(new JsonObject().put("2", "EventProcessingException: Error during invoice lines creation")));
    DataImportEventPayload dataImportEventPayload = new DataImportEventPayload().withEventType(DI_ERROR.value()).withTenant(DI_POST_INVOICE_LINES_SUCCESS_TENANT).withOkapiUrl(OKAPI_URL).withToken(TOKEN).withContext(payloadContext).withProfileSnapshot(profileSnapshotWrapper).withEventsChain(List.of(DI_INVOICE_CREATED.value()));
    Mockito.doNothing().when(journalService).saveBatch(ArgumentMatchers.any(JsonArray.class), ArgumentMatchers.any(String.class));
    KafkaConsumerRecord<String, String> kafkaConsumerRecord = buildKafkaConsumerRecord(dataImportEventPayload);
    dataImportJournalKafkaHandler.handle(kafkaConsumerRecord);
    Mockito.verify(journalService).saveBatch(invoiceRecordCaptor.capture(), Mockito.anyString());
    JsonArray jsonArray = invoiceRecordCaptor.getValue();
    Assert.assertEquals(3, jsonArray.size());
    Assert.assertTrue(jsonArray.getJsonObject(2).getString(ERROR).length() > 0);
    Assert.assertEquals("Invoice line 2:", ActionStatus.ERROR.value(), jsonArray.getJsonObject(2).getString(ACTION_STATUS));
    async.complete();
}
Also used : JsonArray(io.vertx.core.json.JsonArray) HashMap(java.util.HashMap) Async(io.vertx.ext.unit.Async) JsonObject(io.vertx.core.json.JsonObject) KafkaConsumerRecord(io.vertx.kafka.client.consumer.KafkaConsumerRecord) ConsumerRecord(org.apache.kafka.clients.consumer.ConsumerRecord) ParsedRecord(org.folio.ParsedRecord) Record(org.folio.Record) ParsedRecord(org.folio.ParsedRecord) DataImportEventPayload(org.folio.DataImportEventPayload) AbstractRestTest(org.folio.rest.impl.AbstractRestTest) Test(org.junit.Test)

Example 12 with ParsedRecord

use of org.folio.ParsedRecord in project mod-invoice by folio-org.

the class CreateInvoiceEventHandlerTest method shouldMatchPoLinesByPoLineNumberAndCreateInvoiceLinesWithPoLinesFundDistributions.

@Test
public void shouldMatchPoLinesByPoLineNumberAndCreateInvoiceLinesWithPoLinesFundDistributions() throws IOException, InterruptedException {
    // given
    PoLine poLine1 = Json.decodeValue(getMockData(String.format(MOCK_DATA_PATH_PATTERN, PO_LINES_MOCK_DATA_PATH, PO_LINE_ID_1)), PoLine.class);
    PoLine poLine3 = Json.decodeValue(getMockData(String.format(MOCK_DATA_PATH_PATTERN, PO_LINES_MOCK_DATA_PATH, PO_LINE_ID_3)), PoLine.class);
    PoLineCollection poLineCollection = new PoLineCollection().withPoLines(List.of(poLine1, poLine3));
    when(mockOrderLinesRestClient.get(any(), any(RequestContext.class), eq(PoLineCollection.class))).thenReturn(CompletableFuture.completedFuture(poLineCollection));
    ProfileSnapshotWrapper profileSnapshotWrapper = buildProfileSnapshotWrapper(jobProfile, actionProfile, mappingProfileWithPoLineFundDistribution);
    addMockEntry(JOB_PROFILE_SNAPSHOTS_MOCK, profileSnapshotWrapper);
    Record record = new Record().withParsedRecord(new ParsedRecord().withContent(EDIFACT_PARSED_CONTENT)).withId(UUID.randomUUID().toString());
    HashMap<String, String> payloadContext = new HashMap<>();
    payloadContext.put(EDIFACT_INVOICE.value(), Json.encode(record));
    payloadContext.put(JOB_PROFILE_SNAPSHOT_ID_KEY, profileSnapshotWrapper.getId());
    DataImportEventPayload dataImportEventPayload = new DataImportEventPayload().withEventType(DI_EDIFACT_RECORD_CREATED.value()).withTenant(DI_POST_INVOICE_LINES_SUCCESS_TENANT).withOkapiUrl(OKAPI_URL).withToken(TOKEN).withContext(payloadContext);
    String topic = KafkaTopicNameHelper.formatTopicName(KAFKA_ENV_VALUE, getDefaultNameSpace(), DI_POST_INVOICE_LINES_SUCCESS_TENANT, dataImportEventPayload.getEventType());
    Event event = new Event().withEventPayload(Json.encode(dataImportEventPayload));
    KeyValue<String, String> kafkaRecord = new KeyValue<>("test-key", Json.encode(event));
    kafkaRecord.addHeader(RECORD_ID_HEADER, record.getId(), UTF_8);
    SendKeyValues<String, String> request = SendKeyValues.to(topic, Collections.singletonList(kafkaRecord)).useDefaults();
    // when
    kafkaCluster.send(request);
    // then
    String topicToObserve = KafkaTopicNameHelper.formatTopicName(KAFKA_ENV_VALUE, getDefaultNameSpace(), DI_POST_INVOICE_LINES_SUCCESS_TENANT, DI_COMPLETED.value());
    List<String> observedValues = kafkaCluster.observeValues(ObserveKeyValues.on(topicToObserve, 1).with(ConsumerConfig.GROUP_ID_CONFIG, GROUP_ID).observeFor(30, TimeUnit.SECONDS).build());
    Event obtainedEvent = Json.decodeValue(observedValues.get(0), Event.class);
    DataImportEventPayload eventPayload = Json.decodeValue(obtainedEvent.getEventPayload(), DataImportEventPayload.class);
    assertEquals(DI_INVOICE_CREATED.value(), eventPayload.getEventsChain().get(eventPayload.getEventsChain().size() - 1));
    assertNotNull(eventPayload.getContext().get(INVOICE.value()));
    Invoice createdInvoice = Json.decodeValue(eventPayload.getContext().get(INVOICE.value()), Invoice.class);
    assertNotNull(eventPayload.getContext().get(INVOICE_LINES_KEY));
    InvoiceLineCollection createdInvoiceLines = Json.decodeValue(eventPayload.getContext().get(INVOICE_LINES_KEY), InvoiceLineCollection.class);
    assertEquals(3, createdInvoiceLines.getTotalRecords());
    assertEquals(3, createdInvoiceLines.getInvoiceLines().size());
    createdInvoiceLines.getInvoiceLines().forEach(invLine -> assertEquals(createdInvoice.getId(), invLine.getInvoiceId()));
    assertEquals(poLine1.getId(), createdInvoiceLines.getInvoiceLines().get(0).getPoLineId());
    assertEquals(poLine3.getId(), createdInvoiceLines.getInvoiceLines().get(2).getPoLineId());
    assertNull(createdInvoiceLines.getInvoiceLines().get(1).getPoLineId());
    // compare fundDistributions as JsonObject since fund distributions are represented by different classes in invoice line and po line
    assertEquals(new JsonArray(Json.encode(poLine1.getFundDistribution())), new JsonArray(Json.encode(createdInvoiceLines.getInvoiceLines().get(0).getFundDistributions())));
    assertEquals(new JsonArray(Json.encode(poLine3.getFundDistribution())), new JsonArray(Json.encode(createdInvoiceLines.getInvoiceLines().get(2).getFundDistributions())));
    assertTrue(createdInvoiceLines.getInvoiceLines().get(1).getFundDistributions().isEmpty());
}
Also used : KeyValue(net.mguenther.kafka.junit.KeyValue) Invoice(org.folio.rest.jaxrs.model.Invoice) HashMap(java.util.HashMap) ParsedRecord(org.folio.ParsedRecord) ProfileSnapshotWrapper(org.folio.rest.jaxrs.model.ProfileSnapshotWrapper) DataImportEventPayload(org.folio.DataImportEventPayload) JsonArray(io.vertx.core.json.JsonArray) PoLineCollection(org.folio.rest.acq.model.orders.PoLineCollection) PoLine(org.folio.rest.acq.model.orders.PoLine) Event(org.folio.rest.jaxrs.model.Event) ParsedRecord(org.folio.ParsedRecord) Record(org.folio.Record) RequestContext(org.folio.rest.core.models.RequestContext) InvoiceLineCollection(org.folio.rest.jaxrs.model.InvoiceLineCollection) Test(org.junit.jupiter.api.Test)

Example 13 with ParsedRecord

use of org.folio.ParsedRecord in project mod-invoice by folio-org.

the class CreateInvoiceEventHandlerTest method shouldPublishDiErrorWhenMappingProfileHasInvalidMappingSyntax.

@Test
public void shouldPublishDiErrorWhenMappingProfileHasInvalidMappingSyntax() throws InterruptedException {
    // given
    Record record = new Record().withParsedRecord(new ParsedRecord().withContent(PARSED_CONTENT_INVOICE_LINE_3_HAS_NO_SUBTOTAL)).withId(UUID.randomUUID().toString());
    ProfileSnapshotWrapper profileSnapshotWrapper = buildProfileSnapshotWrapper(jobProfile, actionProfile, mappingProfileWithInvalidMappingSyntax);
    addMockEntry(JOB_PROFILE_SNAPSHOTS_MOCK, profileSnapshotWrapper);
    HashMap<String, String> payloadContext = new HashMap<>();
    payloadContext.put(EDIFACT_INVOICE.value(), Json.encode(record));
    payloadContext.put(JOB_PROFILE_SNAPSHOT_ID_KEY, profileSnapshotWrapper.getId());
    DataImportEventPayload dataImportEventPayload = new DataImportEventPayload().withEventType(DI_EDIFACT_RECORD_CREATED.value()).withTenant(DI_POST_INVOICE_LINES_SUCCESS_TENANT).withOkapiUrl(OKAPI_URL).withToken(TOKEN).withContext(payloadContext);
    String topic = KafkaTopicNameHelper.formatTopicName(KAFKA_ENV_VALUE, getDefaultNameSpace(), DI_POST_INVOICE_LINES_SUCCESS_TENANT, dataImportEventPayload.getEventType());
    Event event = new Event().withEventPayload(Json.encode(dataImportEventPayload));
    KeyValue<String, String> kafkaRecord = new KeyValue<>("test-key", Json.encode(event));
    kafkaRecord.addHeader(RECORD_ID_HEADER, record.getId(), UTF_8);
    SendKeyValues<String, String> request = SendKeyValues.to(topic, Collections.singletonList(kafkaRecord)).useDefaults();
    // when
    kafkaCluster.send(request);
    // then
    String topicToObserve = KafkaTopicNameHelper.formatTopicName(KAFKA_ENV_VALUE, getDefaultNameSpace(), DI_POST_INVOICE_LINES_SUCCESS_TENANT, DI_ERROR.value());
    List<String> observedValues = kafkaCluster.observeValues(ObserveKeyValues.on(topicToObserve, 1).with(ConsumerConfig.GROUP_ID_CONFIG, GROUP_ID).observeFor(60, TimeUnit.SECONDS).build());
    Event obtainedEvent = Json.decodeValue(observedValues.get(0), Event.class);
    DataImportEventPayload eventPayload = Json.decodeValue(obtainedEvent.getEventPayload(), DataImportEventPayload.class);
    assertEquals(DI_INVOICE_CREATED.value(), eventPayload.getEventsChain().get(eventPayload.getEventsChain().size() - 1));
}
Also used : KeyValue(net.mguenther.kafka.junit.KeyValue) HashMap(java.util.HashMap) Event(org.folio.rest.jaxrs.model.Event) ParsedRecord(org.folio.ParsedRecord) Record(org.folio.Record) ParsedRecord(org.folio.ParsedRecord) ProfileSnapshotWrapper(org.folio.rest.jaxrs.model.ProfileSnapshotWrapper) DataImportEventPayload(org.folio.DataImportEventPayload) Test(org.junit.jupiter.api.Test)

Example 14 with ParsedRecord

use of org.folio.ParsedRecord in project mod-invoice by folio-org.

the class CreateInvoiceEventHandlerTest method shouldMatchPoLineByPoLineNumberAndLeaveEmptyInvoiceLineFundDistributionExpenseClassIdWhenMatchedPoLineHasDifferentExpenseClasses.

@Test
public void shouldMatchPoLineByPoLineNumberAndLeaveEmptyInvoiceLineFundDistributionExpenseClassIdWhenMatchedPoLineHasDifferentExpenseClasses() throws IOException, InterruptedException {
    // given
    PoLine poLine3 = Json.decodeValue(getMockData(String.format(MOCK_DATA_PATH_PATTERN, PO_LINES_MOCK_DATA_PATH, PO_LINE_ID_3)), PoLine.class);
    PoLineCollection poLineCollection = new PoLineCollection().withPoLines(List.of(poLine3));
    when(mockOrderLinesRestClient.get(any(), any(RequestContext.class), eq(PoLineCollection.class))).thenReturn(CompletableFuture.completedFuture(poLineCollection)).thenReturn(CompletableFuture.completedFuture(new PoLineCollection()));
    ProfileSnapshotWrapper profileSnapshotWrapper = buildProfileSnapshotWrapper(jobProfile, actionProfile, mappingProfileWithMixedFundDistributionMapping);
    addMockEntry(JOB_PROFILE_SNAPSHOTS_MOCK, profileSnapshotWrapper);
    Record record = new Record().withParsedRecord(new ParsedRecord().withContent(EDIFACT_PARSED_CONTENT)).withId(UUID.randomUUID().toString());
    HashMap<String, String> payloadContext = new HashMap<>();
    payloadContext.put(EDIFACT_INVOICE.value(), Json.encode(record));
    payloadContext.put(JOB_PROFILE_SNAPSHOT_ID_KEY, profileSnapshotWrapper.getId());
    DataImportEventPayload dataImportEventPayload = new DataImportEventPayload().withEventType(DI_EDIFACT_RECORD_CREATED.value()).withTenant(DI_POST_INVOICE_LINES_SUCCESS_TENANT).withOkapiUrl(OKAPI_URL).withToken(TOKEN).withContext(payloadContext);
    String topic = KafkaTopicNameHelper.formatTopicName(KAFKA_ENV_VALUE, getDefaultNameSpace(), DI_POST_INVOICE_LINES_SUCCESS_TENANT, dataImportEventPayload.getEventType());
    Event event = new Event().withEventPayload(Json.encode(dataImportEventPayload));
    KeyValue<String, String> kafkaRecord = new KeyValue<>("test-key", Json.encode(event));
    kafkaRecord.addHeader(RECORD_ID_HEADER, record.getId(), UTF_8);
    SendKeyValues<String, String> request = SendKeyValues.to(topic, Collections.singletonList(kafkaRecord)).useDefaults();
    // when
    kafkaCluster.send(request);
    // then
    String topicToObserve = KafkaTopicNameHelper.formatTopicName(KAFKA_ENV_VALUE, getDefaultNameSpace(), DI_POST_INVOICE_LINES_SUCCESS_TENANT, DI_COMPLETED.value());
    List<String> observedValues = kafkaCluster.observeValues(ObserveKeyValues.on(topicToObserve, 1).with(ConsumerConfig.GROUP_ID_CONFIG, GROUP_ID).observeFor(30, TimeUnit.SECONDS).build());
    Event obtainedEvent = Json.decodeValue(observedValues.get(0), Event.class);
    DataImportEventPayload eventPayload = Json.decodeValue(obtainedEvent.getEventPayload(), DataImportEventPayload.class);
    assertEquals(DI_INVOICE_CREATED.value(), eventPayload.getEventsChain().get(eventPayload.getEventsChain().size() - 1));
    assertNotNull(eventPayload.getContext().get(INVOICE.value()));
    Invoice createdInvoice = Json.decodeValue(eventPayload.getContext().get(INVOICE.value()), Invoice.class);
    assertNotNull(eventPayload.getContext().get(INVOICE_LINES_KEY));
    InvoiceLineCollection createdInvoiceLines = Json.decodeValue(eventPayload.getContext().get(INVOICE_LINES_KEY), InvoiceLineCollection.class);
    assertEquals(3, createdInvoiceLines.getTotalRecords());
    assertEquals(3, createdInvoiceLines.getInvoiceLines().size());
    createdInvoiceLines.getInvoiceLines().forEach(invLine -> assertEquals(createdInvoice.getId(), invLine.getInvoiceId()));
    assertNull(createdInvoiceLines.getInvoiceLines().get(0).getPoLineId());
    assertNull(createdInvoiceLines.getInvoiceLines().get(1).getPoLineId());
    assertEquals(poLine3.getId(), createdInvoiceLines.getInvoiceLines().get(2).getPoLineId());
    assertEquals(1, createdInvoiceLines.getInvoiceLines().get(2).getFundDistributions().size());
    assertNotNull(createdInvoiceLines.getInvoiceLines().get(2).getFundDistributions().get(0).getFundId());
    assertNotNull(createdInvoiceLines.getInvoiceLines().get(2).getFundDistributions().get(0).getValue());
    assertEquals(2, poLine3.getFundDistribution().size());
    assertNotEquals(poLine3.getFundDistribution().get(0).getExpenseClassId(), poLine3.getFundDistribution().get(1).getExpenseClassId());
    assertNull(createdInvoiceLines.getInvoiceLines().get(2).getFundDistributions().get(0).getExpenseClassId());
}
Also used : KeyValue(net.mguenther.kafka.junit.KeyValue) Invoice(org.folio.rest.jaxrs.model.Invoice) HashMap(java.util.HashMap) ParsedRecord(org.folio.ParsedRecord) ProfileSnapshotWrapper(org.folio.rest.jaxrs.model.ProfileSnapshotWrapper) DataImportEventPayload(org.folio.DataImportEventPayload) PoLineCollection(org.folio.rest.acq.model.orders.PoLineCollection) PoLine(org.folio.rest.acq.model.orders.PoLine) Event(org.folio.rest.jaxrs.model.Event) ParsedRecord(org.folio.ParsedRecord) Record(org.folio.Record) InvoiceLineCollection(org.folio.rest.jaxrs.model.InvoiceLineCollection) Test(org.junit.jupiter.api.Test)

Example 15 with ParsedRecord

use of org.folio.ParsedRecord in project mod-invoice by folio-org.

the class CreateInvoiceEventHandler method getAssociatedPoLines.

private CompletableFuture<Map<Integer, PoLine>> getAssociatedPoLines(DataImportEventPayload eventPayload, Map<String, String> okapiHeaders) {
    String recordAsString = eventPayload.getContext().get(EDIFACT_INVOICE.value());
    Record sourceRecord = Json.decodeValue(recordAsString, Record.class);
    ParsedRecord parsedRecord = sourceRecord.getParsedRecord();
    long invoiceLinesAmount = determineInvoiceLinesQuantity(parsedRecord);
    Optional<String> poLineNoExpressionOptional = getPoLineNoMappingExpression(eventPayload);
    Map<Integer, String> invoiceLineNoToPoLineNo = poLineNoExpressionOptional.map(expression -> EdifactRecordReader.getInvoiceLinesSegmentsValues(parsedRecord, expression)).orElse(Collections.emptyMap());
    List<String> ReferenceNumberExpressions = getPoLineRefNumberMappingExpressions(eventPayload);
    Map<Integer, List<String>> invoiceLineNoToRefNo2 = ReferenceNumberExpressions.isEmpty() ? Collections.emptyMap() : retrieveInvoiceLinesReferenceNumbers(parsedRecord, ReferenceNumberExpressions);
    return getAssociatedPoLinesByPoLineNumber(invoiceLineNoToPoLineNo, okapiHeaders).thenCompose(associatedPoLineMap -> {
        if (associatedPoLineMap.size() < invoiceLinesAmount) {
            associatedPoLineMap.keySet().forEach(invoiceLineNoToRefNo2::remove);
            return getAssociatedPoLinesByRefNumbers(invoiceLineNoToRefNo2, new RequestContext(Vertx.currentContext(), okapiHeaders)).thenApply(poLinesMap -> {
                associatedPoLineMap.putAll(poLinesMap);
                return associatedPoLineMap;
            });
        }
        return CompletableFuture.completedFuture(associatedPoLineMap);
    });
}
Also used : ORDER_LINES(org.folio.invoices.utils.ResourcePathResolver.ORDER_LINES) CREATE(org.folio.ActionProfile.Action.CREATE) EventHandler(org.folio.processing.events.services.handler.EventHandler) CompletableFuture.completedFuture(java.util.concurrent.CompletableFuture.completedFuture) PoLine(org.folio.rest.acq.model.orders.PoLine) ACTION_PROFILE(org.folio.rest.jaxrs.model.ProfileSnapshotWrapper.ContentType.ACTION_PROFILE) StreamEx.ofSubLists(one.util.streamex.StreamEx.ofSubLists) Pair(org.apache.commons.lang3.tuple.Pair) Map(java.util.Map) JsonObject(io.vertx.core.json.JsonObject) OPEN(org.folio.rest.jaxrs.model.InvoiceLine.InvoiceLineStatus.OPEN) HelperUtils.collectResultsOnSuccess(org.folio.invoices.utils.HelperUtils.collectResultsOnSuccess) MappingProfile(org.folio.MappingProfile) InvoiceLine(org.folio.rest.jaxrs.model.InvoiceLine) DataImportEventPayload(org.folio.DataImportEventPayload) EdifactParsedContent(org.folio.EdifactParsedContent) Collectors(java.util.stream.Collectors) String.format(java.lang.String.format) Objects(java.util.Objects) List(java.util.List) CollectionUtils.isNotEmpty(org.apache.commons.collections4.CollectionUtils.isNotEmpty) Logger(org.apache.logging.log4j.Logger) DI_INVOICE_CREATED(org.folio.DataImportEventTypes.DI_INVOICE_CREATED) Optional(java.util.Optional) ParsedRecord(org.folio.ParsedRecord) Pattern(java.util.regex.Pattern) Invoice(org.folio.rest.jaxrs.model.Invoice) RestClient(org.folio.rest.core.RestClient) FundDistribution(org.folio.rest.acq.model.orders.FundDistribution) Json(io.vertx.core.json.Json) INVOICE(org.folio.ActionProfile.FolioRecord.INVOICE) Record(org.folio.Record) MappingManager(org.folio.processing.mapping.MappingManager) PoLineCollection(org.folio.rest.acq.model.orders.PoLineCollection) HashMap(java.util.HashMap) CompletableFuture(java.util.concurrent.CompletableFuture) EDIFACT_INVOICE(org.folio.rest.jaxrs.model.EntityType.EDIFACT_INVOICE) ArrayList(java.util.ArrayList) InvoiceLineHelper(org.folio.rest.impl.InvoiceLineHelper) InvoiceLineCollection(org.folio.rest.jaxrs.model.InvoiceLineCollection) RequestContext(org.folio.rest.core.models.RequestContext) ActionProfile(org.folio.ActionProfile) ResourcePathResolver.resourcesPath(org.folio.invoices.utils.ResourcePathResolver.resourcesPath) MappingContext(org.folio.processing.mapping.mapper.MappingContext) DataImportUtils(org.folio.dataimport.utils.DataImportUtils) Vertx(io.vertx.core.Vertx) RequestEntry(org.folio.rest.core.models.RequestEntry) InvoiceHelper(org.folio.rest.impl.InvoiceHelper) JsonArray(io.vertx.core.json.JsonArray) EventProcessingException(org.folio.processing.exceptions.EventProcessingException) StringUtils.isBlank(org.apache.commons.lang3.StringUtils.isBlank) EdifactRecordReader(org.folio.processing.mapping.mapper.reader.record.edifact.EdifactRecordReader) Collections(java.util.Collections) LogManager(org.apache.logging.log4j.LogManager) ParsedRecord(org.folio.ParsedRecord) ParsedRecord(org.folio.ParsedRecord) Record(org.folio.Record) List(java.util.List) ArrayList(java.util.ArrayList) RequestContext(org.folio.rest.core.models.RequestContext)

Aggregations

HashMap (java.util.HashMap)15 DataImportEventPayload (org.folio.DataImportEventPayload)15 ParsedRecord (org.folio.ParsedRecord)15 Record (org.folio.Record)15 KeyValue (net.mguenther.kafka.junit.KeyValue)9 Event (org.folio.rest.jaxrs.model.Event)9 InvoiceLineCollection (org.folio.rest.jaxrs.model.InvoiceLineCollection)9 ProfileSnapshotWrapper (org.folio.rest.jaxrs.model.ProfileSnapshotWrapper)9 Test (org.junit.jupiter.api.Test)9 Invoice (org.folio.rest.jaxrs.model.Invoice)7 JsonArray (io.vertx.core.json.JsonArray)6 PoLine (org.folio.rest.acq.model.orders.PoLine)6 PoLineCollection (org.folio.rest.acq.model.orders.PoLineCollection)6 JsonObject (io.vertx.core.json.JsonObject)5 Async (io.vertx.ext.unit.Async)5 KafkaConsumerRecord (io.vertx.kafka.client.consumer.KafkaConsumerRecord)5 ConsumerRecord (org.apache.kafka.clients.consumer.ConsumerRecord)5 AbstractRestTest (org.folio.rest.impl.AbstractRestTest)5 Test (org.junit.Test)5 RequestContext (org.folio.rest.core.models.RequestContext)3