diff --git a/live-ingester/src/integration-test/java/org/alfresco/hxi_connector/live_ingester/domain/usecase/e2e/repository/CreateRequestIntegrationTest.java b/live-ingester/src/integration-test/java/org/alfresco/hxi_connector/live_ingester/domain/usecase/e2e/repository/CreateRequestIntegrationTest.java index d90d0f598..2731de1c1 100644 --- a/live-ingester/src/integration-test/java/org/alfresco/hxi_connector/live_ingester/domain/usecase/e2e/repository/CreateRequestIntegrationTest.java +++ b/live-ingester/src/integration-test/java/org/alfresco/hxi_connector/live_ingester/domain/usecase/e2e/repository/CreateRequestIntegrationTest.java @@ -30,6 +30,8 @@ import org.junit.jupiter.api.Test; import org.alfresco.hxi_connector.live_ingester.util.E2ETestBase; +import org.alfresco.hxi_connector.live_ingester.util.insight_api.HxInsightRequest; +import org.alfresco.hxi_connector.live_ingester.util.insight_api.RequestLoader; public class CreateRequestIntegrationTest extends E2ETestBase { @@ -87,41 +89,8 @@ void testCreateRequest() containerSupport.raiseRepoEvent(repoEvent); // then - String expectedBody = """ - [ - { - "objectId": "d71dd823-82c7-477c-8490-04cb0e826e65", - "sourceId" : "alfresco-dummy-source-id-0a63de491876", - "eventType": "create", - "sourceTimestamp": 1611227656423, - "properties": { - "cm:autoVersion": {"value": true}, - "createdAt": {"value": 1611227655695}, - "modifiedAt": {"value" : 1611227655695}, - "cm:versionType": {"value": "MAJOR"}, - "aspectsNames": {"value": ["cm:versionable", "cm:auditable"]}, - "cm:name": { - "value": "purchase-order-scan.doc", - "annotation" : "name" - }, - "type": {"value": "cm:content"}, - "createdBy": {"value": "admin"}, - "modifiedBy": {"value": "admin"}, - "cm:content": { - "file": { - "content-metadata": { - "size": 531152, - "name": "purchase-order-scan.doc", - "content-type": "application/msword" - } - } - }, - "ALLOW_ACCESS": {"value": ["GROUP_EVERYONE"]}, - "DENY_ACCESS": {"value": []} - } - } - ]"""; - containerSupport.expectHxIngestMessageReceived(expectedBody); + HxInsightRequest request = RequestLoader.load("/expected-hxinsight-requests/create-document-request.yml"); + containerSupport.expectHxIngestMessageReceived(request.body()); String expectedATSRequest = """ {