Eliminate NormalizedNodePayload.headers
[netconf.git] / restconf / restconf-nb / src / test / java / org / opendaylight / restconf / nb / rfc8040 / rests / services / impl / RestconfStreamsSubscriptionServiceImplTest.java
index 0579dddabdd5757feb2c57b6d5a782df41643f6f..f84269061713b605455b2ab9965d101f95daee17 100644 (file)
@@ -36,7 +36,6 @@ import org.opendaylight.restconf.common.errors.RestconfDocumentedException;
 import org.opendaylight.restconf.nb.rfc8040.URLConstants;
 import org.opendaylight.restconf.nb.rfc8040.databind.DatabindContext;
 import org.opendaylight.restconf.nb.rfc8040.databind.DatabindProvider;
-import org.opendaylight.restconf.nb.rfc8040.legacy.NormalizedNodePayload;
 import org.opendaylight.restconf.nb.rfc8040.streams.StreamsConfiguration;
 import org.opendaylight.restconf.nb.rfc8040.streams.listeners.ListenerAdapter;
 import org.opendaylight.restconf.nb.rfc8040.streams.listeners.ListenersBroker;
@@ -120,14 +119,13 @@ public class RestconfStreamsSubscriptionServiceImplTest {
                 IdentifierCodec.deserialize("toaster:toaster/toasterStatus", MODEL_CONTEXT),
                 "data-change-event-subscription/toaster:toaster/toasterStatus/datastore=OPERATIONAL/scope=ONE",
                 NotificationOutputType.XML);
-        final RestconfStreamsSubscriptionServiceImpl streamsSubscriptionService =
-                new RestconfStreamsSubscriptionServiceImpl(dataBroker, notificationService, databindProvider,
-                        configurationSse);
-        final NormalizedNodePayload response = streamsSubscriptionService.subscribeToStream(
+        final var streamsSubscriptionService = new RestconfStreamsSubscriptionServiceImpl(dataBroker,
+            notificationService, databindProvider, configurationSse);
+        final var response = streamsSubscriptionService.subscribeToStream(
             "data-change-event-subscription/toaster:toaster/toasterStatus/datastore=OPERATIONAL/scope=ONE", uriInfo);
         assertEquals("http://localhost:8181/" + URLConstants.BASE_PATH + "/" + URLConstants.SSE_SUBPATH
             + "/data-change-event-subscription/toaster:toaster/toasterStatus/datastore=OPERATIONAL/scope=ONE",
-            response.getNewHeaders().get("Location").toString());
+            response.getLocation().toString());
     }
 
     @Test
@@ -136,14 +134,13 @@ public class RestconfStreamsSubscriptionServiceImplTest {
                 IdentifierCodec.deserialize("toaster:toaster/toasterStatus", MODEL_CONTEXT),
                 "data-change-event-subscription/toaster:toaster/toasterStatus/datastore=OPERATIONAL/scope=ONE",
                 NotificationOutputType.XML);
-        final RestconfStreamsSubscriptionServiceImpl streamsSubscriptionService =
-                new RestconfStreamsSubscriptionServiceImpl(dataBroker, notificationService, databindProvider,
-                        configurationWs);
-        final NormalizedNodePayload response = streamsSubscriptionService.subscribeToStream(
+        final var streamsSubscriptionService = new RestconfStreamsSubscriptionServiceImpl(dataBroker,
+            notificationService, databindProvider, configurationWs);
+        final var response = streamsSubscriptionService.subscribeToStream(
             "data-change-event-subscription/toaster:toaster/toasterStatus/datastore=OPERATIONAL/scope=ONE", uriInfo);
         assertEquals("ws://localhost:8181/" + URLConstants.BASE_PATH
             + "/data-change-event-subscription/toaster:toaster/toasterStatus/datastore=OPERATIONAL/scope=ONE",
-            response.getNewHeaders().get("Location").toString());
+            response.getLocation().toString());
     }
 
     @Test