summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWeiss, Sara (sw793d) <sara.weiss@intl.att.com>2019-09-08 14:07:21 +0300
committerIttay Stern <ittay.stern@att.com>2019-09-09 14:13:56 +0000
commit1160721383d5ac0f5078d26f6af415f4f37afb73 (patch)
tree9cde1ce985ea1673863764442ee4400606a35744
parent4edd50d4d8192a68c0bc6ee19d443c82ebf22379 (diff)
add UT to PromiseEcompRequestIdFilterTest
Issue-ID: VID-378 Signed-off-by: Sara Weiss <sara.weiss@intl.att.com> Change-Id: I57588574858b5d7982d4023165943c458ac7a03f
-rw-r--r--vid-app-common/src/test/java/org/onap/vid/controller/PromiseEcompRequestIdFilterTest.java15
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 {