From 1160721383d5ac0f5078d26f6af415f4f37afb73 Mon Sep 17 00:00:00 2001 From: "Weiss, Sara (sw793d)" Date: Sun, 8 Sep 2019 14:07:21 +0300 Subject: add UT to PromiseEcompRequestIdFilterTest Issue-ID: VID-378 Signed-off-by: Sara Weiss Change-Id: I57588574858b5d7982d4023165943c458ac7a03f --- .../vid/controller/PromiseEcompRequestIdFilterTest.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'vid-app-common') diff --git a/vid-app-common/src/test/java/org/onap/vid/controller/PromiseEcompRequestIdFilterTest.java b/vid-app-common/src/test/java/org/onap/vid/controller/PromiseEcompRequestIdFilterTest.java index f44099569..39638c305 100644 --- a/vid-app-common/src/test/java/org/onap/vid/controller/PromiseEcompRequestIdFilterTest.java +++ b/vid-app-common/src/test/java/org/onap/vid/controller/PromiseEcompRequestIdFilterTest.java @@ -67,6 +67,21 @@ public class PromiseEcompRequestIdFilterTest { buildRequestThenRunThroughFilterAndAssertResultRequestHeaders(incomingRequestHeaders, specificTxId(someTxId)); } + + @Test + public void givenRequestIdHeaderThatIsNotAUUID_headerValueChanged() throws IOException, ServletException { + + final String someTxId = "863850e28544efd94b8afba5f52b3d5"; + + final ImmutableMap incomingRequestHeaders = ImmutableMap.of( + anotherHeader, anotherValue, + ECOMP_REQUEST_ID, someTxId + ); + + buildRequestThenRunThroughFilterAndAssertResultRequestHeaders(incomingRequestHeaders, UserUtils::getRequestId); + } + + @Test public void givenMixedCaseRequestIdHeader_headerValueNotChanged() throws IOException, ServletException { -- cgit 1.2.3-korg