From ccfcc9e8ebcdba3f4cf2646e59e55f486cae22d9 Mon Sep 17 00:00:00 2001 From: jonnysw Date: Wed, 19 Jun 2024 08:51:53 +0100 Subject: [PATCH] Updating tests to include Queue model --- .../services/lambda/runtime/tests/EventLoaderTest.java | 4 ++++ aws-lambda-java-tests/src/test/resources/connect_event.json | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/aws-lambda-java-tests/src/test/java/com/amazonaws/services/lambda/runtime/tests/EventLoaderTest.java b/aws-lambda-java-tests/src/test/java/com/amazonaws/services/lambda/runtime/tests/EventLoaderTest.java index 1c9d17e1..e15a0f68 100644 --- a/aws-lambda-java-tests/src/test/java/com/amazonaws/services/lambda/runtime/tests/EventLoaderTest.java +++ b/aws-lambda-java-tests/src/test/java/com/amazonaws/services/lambda/runtime/tests/EventLoaderTest.java @@ -290,6 +290,10 @@ public void testLoadConnectEvent() { assertThat(contactData.getSystemEndpoint()) .returns("+21234567890",from(ConnectEvent.SystemEndpoint::getAddress)) .returns("TELEPHONE_NUMBER",from(ConnectEvent.SystemEndpoint::getType)); + + assertThat(contactData.getQueue()) + .returns("arn:aws:connect:eu-central-1:123456789012:instance/9308c2a1-9bc6-4cea-8290-6c0b4a6d38fa/queue/941464de-39b7-4cae-82e9-a44f070ef59e", from(ConnectEvent.Queue::getArn)) + .returns("ExampleQueue",from(ConnectEvent.Queue::getName)); } @Test diff --git a/aws-lambda-java-tests/src/test/resources/connect_event.json b/aws-lambda-java-tests/src/test/resources/connect_event.json index a9e04f7f..126a4bca 100644 --- a/aws-lambda-java-tests/src/test/resources/connect_event.json +++ b/aws-lambda-java-tests/src/test/resources/connect_event.json @@ -22,7 +22,10 @@ } }, "PreviousContactId": "4ca32fbd-8f92-46af-92a5-6b0f970f0efe", - "Queue": null, + "Queue": { + "ARN": "arn:aws:connect:eu-central-1:123456789012:instance/9308c2a1-9bc6-4cea-8290-6c0b4a6d38fa/queue/941464de-39b7-4cae-82e9-a44f070ef59e", + "Name": "PasswordReset" + }, "SystemEndpoint": { "Address": "+21234567890", "Type": "TELEPHONE_NUMBER"