add UT to PromiseEcompRequestIdFilterTest 90/95190/4
authorWeiss, Sara (sw793d) <sara.weiss@intl.att.com>
Sun, 8 Sep 2019 11:07:21 +0000 (14:07 +0300)
committerIttay Stern <ittay.stern@att.com>
Mon, 9 Sep 2019 14:13:56 +0000 (14:13 +0000)
Issue-ID: VID-378
Signed-off-by: Sara Weiss <sara.weiss@intl.att.com>
Change-Id: I57588574858b5d7982d4023165943c458ac7a03f

vid-app-common/src/test/java/org/onap/vid/controller/PromiseEcompRequestIdFilterTest.java

index f440995..39638c3 100644 (file)
@@ -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 {