diff options
Diffstat (limited to 'dcae-analytics/dcae-analytics-tca-web/src/test/java')
-rw-r--r-- | dcae-analytics/dcae-analytics-tca-web/src/test/java/org/onap/dcae/analytics/tca/web/integration/TcaPublisherResponseHandlerTest.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/dcae-analytics/dcae-analytics-tca-web/src/test/java/org/onap/dcae/analytics/tca/web/integration/TcaPublisherResponseHandlerTest.java b/dcae-analytics/dcae-analytics-tca-web/src/test/java/org/onap/dcae/analytics/tca/web/integration/TcaPublisherResponseHandlerTest.java index 66043aa..2637a39 100644 --- a/dcae-analytics/dcae-analytics-tca-web/src/test/java/org/onap/dcae/analytics/tca/web/integration/TcaPublisherResponseHandlerTest.java +++ b/dcae-analytics/dcae-analytics-tca-web/src/test/java/org/onap/dcae/analytics/tca/web/integration/TcaPublisherResponseHandlerTest.java @@ -1,6 +1,7 @@ /* * ================================================================================ * Copyright (c) 2019 IBM Intellectual Property. All rights reserved. + * Copyright (c) 2021 China Mobile Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,17 +27,19 @@ import org.junit.jupiter.api.Test; import org.mockito.Mockito; import org.onap.dcae.analytics.tca.web.TcaAppProperties; import org.onap.dcae.analytics.tca.web.TcaAppProperties.Tca; +import org.springframework.messaging.MessageHeaders; public class TcaPublisherResponseHandlerTest { - static Map<String, Object> headers; + static MessageHeaders messageHeaders; @BeforeAll static void initialize() { - headers = new HashMap<>(); + Map headers = new HashMap<>(); headers.put("X-ECOMP-RequestID", "TestRequestID"); headers.put("X-ECOMP-TransactionID", "TestTransactionID"); headers.put("X-ECOMP-FromAppID", "TestFromAppID"); + messageHeaders = new MessageHeaders(headers); } @@ -49,7 +52,7 @@ public class TcaPublisherResponseHandlerTest { Mockito.when(tcaAppProperties.getTca().getEnableEcompLogging()).thenReturn(true); TcaPublisherResponseHandler responseHandler = new TcaPublisherResponseHandler(tcaAppProperties); - responseHandler.handle("testpayload", headers); + responseHandler.handle("testpayload", messageHeaders); } @@ -62,8 +65,9 @@ public class TcaPublisherResponseHandlerTest { Mockito.when(tcaAppProperties.getTca().getEnableEcompLogging()).thenReturn(false); TcaPublisherResponseHandler responseHandler = new TcaPublisherResponseHandler(tcaAppProperties); - responseHandler.handle("testpayload", headers); + responseHandler.handle("testpayload", messageHeaders); } } + |