Update MRI projects for Aluminium
[netconf.git] / restconf / restconf-nb-rfc8040 / src / test / java / org / opendaylight / restconf / nb / rfc8040 / rests / services / impl / RestconfStreamsSubscriptionServiceImplTest.java
index 64751f82d56dff303b21af684d865f3b651df1f5..f535851fd5e6dc65bb71a7baa0c4cdb33484391e 100644 (file)
@@ -52,6 +52,7 @@ import org.opendaylight.restconf.nb.rfc8040.handlers.SchemaContextHandler;
 import org.opendaylight.restconf.nb.rfc8040.handlers.TransactionChainHandler;
 import org.opendaylight.restconf.nb.rfc8040.streams.listeners.ListenerAdapter;
 import org.opendaylight.restconf.nb.rfc8040.streams.listeners.ListenersBroker;
+import org.opendaylight.restconf.nb.rfc8040.utils.RestconfConstants;
 import org.opendaylight.restconf.nb.rfc8040.utils.parser.IdentifierCodec;
 import org.opendaylight.yang.gen.v1.urn.sal.restconf.event.subscription.rev140708.NotificationOutputTypeGrouping.NotificationOutputType;
 import org.opendaylight.yangtools.concepts.ListenerRegistration;
@@ -112,7 +113,7 @@ public class RestconfStreamsSubscriptionServiceImplTest {
         when(uriInfo.getBaseUriBuilder()).thenReturn(baseUriBuilder);
         final URI uri = new URI("http://127.0.0.1/" + URI);
         when(uriInfo.getAbsolutePath()).thenReturn(uri);
-        this.schemaHandler.onGlobalContextUpdated(
+        this.schemaHandler.onModelContextUpdated(
                 YangParserTestUtils.parseYangFiles(TestRestconfUtils.loadFiles("/notifications")));
     }
 
@@ -165,10 +166,9 @@ public class RestconfStreamsSubscriptionServiceImplTest {
                 .subscribeToStream(
                         "data-change-event-subscription/toaster:toaster/toasterStatus/datastore=OPERATIONAL/scope=ONE",
                         this.uriInfo);
-        assertEquals(
-                "ws://localhost:8181/data-change-event-subscription"
-                        + "/toaster:toaster/toasterStatus/datastore=OPERATIONAL/scope=ONE",
-            response.getNewHeaders().get("Location").toString());
+        assertEquals("ws://localhost:8181/" + RestconfConstants.BASE_URI_PATTERN
+                + "/data-change-event-subscription/toaster:toaster/toasterStatus/"
+                + "datastore=OPERATIONAL/scope=ONE", response.getNewHeaders().get("Location").toString());
     }
 
     @Test(expected = RestconfDocumentedException.class)