diff options
author | Weiss, Sara (sw793d) <sara.weiss@intl.att.com> | 2019-09-08 14:07:21 +0300 |
---|---|---|
committer | Ittay Stern <ittay.stern@att.com> | 2019-09-09 14:13:56 +0000 |
commit | 1160721383d5ac0f5078d26f6af415f4f37afb73 (patch) | |
tree | 9cde1ce985ea1673863764442ee4400606a35744 /vid-app-common/src | |
parent | 4edd50d4d8192a68c0bc6ee19d443c82ebf22379 (diff) |
add UT to PromiseEcompRequestIdFilterTest
Issue-ID: VID-378
Signed-off-by: Sara Weiss <sara.weiss@intl.att.com>
Change-Id: I57588574858b5d7982d4023165943c458ac7a03f
Diffstat (limited to 'vid-app-common/src')
-rw-r--r-- | vid-app-common/src/test/java/org/onap/vid/controller/PromiseEcompRequestIdFilterTest.java | 15 |
1 files changed, 15 insertions, 0 deletions
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<String, String> incomingRequestHeaders = ImmutableMap.of( + anotherHeader, anotherValue, + ECOMP_REQUEST_ID, someTxId + ); + + buildRequestThenRunThroughFilterAndAssertResultRequestHeaders(incomingRequestHeaders, UserUtils::getRequestId); + } + + @Test public void givenMixedCaseRequestIdHeader_headerValueNotChanged() throws IOException, ServletException { |