diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/filter/PromiseRequestIdFilter.java b/vid-app-common/src/main/java/org/onap/vid/controller/filter/PromiseRequestIdFilter.java
index 1c96819..faaf55a 100644
--- a/vid-app-common/src/main/java/org/onap/vid/controller/filter/PromiseRequestIdFilter.java
+++ b/vid-app-common/src/main/java/org/onap/vid/controller/filter/PromiseRequestIdFilter.java
@@ -41,10 +41,8 @@
 import javax.servlet.http.HttpServletRequestWrapper;
 import javax.servlet.http.HttpServletResponse;
 import javax.validation.constraints.NotNull;
-import org.onap.logging.ref.slf4j.ONAPLogConstants.MDCs;
 import org.onap.vid.logging.Headers;
 import org.onap.vid.logging.RequestIdHeader;
-import org.slf4j.MDC;
 import org.springframework.web.filter.GenericFilterBean;
 
 @WebFilter(urlPatterns = "/*")
@@ -84,17 +82,12 @@
 
         if (isWrapNeeded(highestPriorityHeader, originalRequestId)) {
             // Copy originalRequestId to the promised header value
-            request = new PromiseRequestIdRequestWrapper(httpRequest,
-                firstValidUuidOrElse(originalRequestId, requestIdFromMDC(), UUID::randomUUID));
+            request = new PromiseRequestIdRequestWrapper(httpRequest, toUuidOrElse(originalRequestId, UUID::randomUUID));
         }
 
         return request;
     }
 
-    private String requestIdFromMDC() {
-        return MDC.get(MDCs.REQUEST_ID);
-    }
-
     private boolean verifyAndValidateUuid(String value) {
         return isNotEmpty(value) && uuidRegex.matcher(value).matches();
     }
@@ -106,10 +99,6 @@
         return !headerExistsAndValid;
     }
 
-    UUID firstValidUuidOrElse(String uuid1, String uuid2, Supplier<UUID> uuidSupplier) {
-        return toUuidOrElse(uuid1, () -> toUuidOrElse(uuid2, uuidSupplier));
-    }
-
     UUID toUuidOrElse(String uuid, Supplier<UUID> uuidSupplier) {
         if (verifyAndValidateUuid(uuid)) {
             try {
diff --git a/vid-app-common/src/test/java/org/onap/vid/controller/filter/PromiseRequestIdFilterTest.java b/vid-app-common/src/test/java/org/onap/vid/controller/filter/PromiseRequestIdFilterTest.java
index f415bfb..d67bd61 100644
--- a/vid-app-common/src/test/java/org/onap/vid/controller/filter/PromiseRequestIdFilterTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/controller/filter/PromiseRequestIdFilterTest.java
@@ -51,12 +51,9 @@
 import org.mockito.ArgumentCaptor;
 import org.mockito.Mockito;
 import org.mockito.stubbing.Answer;
-import org.onap.logging.ref.slf4j.ONAPLogConstants.MDCs;
 import org.onap.portalsdk.core.web.support.UserUtils;
 import org.onap.vid.logging.RequestIdHeader;
-import org.slf4j.MDC;
 import org.springframework.mock.web.MockHttpServletResponse;
-import org.testng.annotations.AfterMethod;
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 
@@ -73,18 +70,10 @@
 
     private final PromiseRequestIdFilter promiseRequestIdFilter = new PromiseRequestIdFilter();
 
-    @AfterMethod
-    public void tearDown() {
-        MDC.remove(MDCs.REQUEST_ID);
-    }
-
     @Test
-    public void givenMdcValueAndRequestIdHeader_headerValueNotChanged() throws IOException, ServletException {
+    public void givenRequestIdHeader_headerValueNotChanged() throws IOException, ServletException {
 
         final String someTxId = "863850e2-8545-4efd-94b8-afba5f52b3d5";
-        final String mdcTxId = "ed752ff1-3970-4f18-8219-2d821fa4eaea";
-
-        MDC.put(MDCs.REQUEST_ID, mdcTxId);
 
         final ImmutableMap<String, String> incomingRequestHeaders = ImmutableMap.of(
                 anotherHeader, anotherValue,
@@ -133,20 +122,6 @@
     }
 
     @Test
-    public void givenMdcValueAndNoRequestIdHeader_headerValueWasFromMDC() throws IOException, ServletException {
-
-        final String mdcTxId = "ed752ff1-3970-4f18-8219-2d821fa4eaea";
-
-        MDC.put(MDCs.REQUEST_ID, mdcTxId);
-
-        final ImmutableMap<String, String> incomingRequestHeaders = ImmutableMap.of(
-                anotherHeader, anotherValue
-        );
-
-        buildRequestThenRunThroughFilterAndAssertResultRequestHeaders(incomingRequestHeaders, specificTxId(mdcTxId));
-    }
-
-    @Test
     public void givenTwoRequestIdHeader_onapHeaderValueIsUsed() throws IOException, ServletException {
 
         final String onapTxId = "863850e2-8545-4efd-94b8-AFBA5F52B3D5"; // note mixed case
