aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src
diff options
context:
space:
mode:
Diffstat (limited to 'vid-app-common/src')
-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 {