Merge "Prevent ConfigPusher from killing its thread"
[controller.git] / opendaylight / md-sal / sal-rest-connector / src / test / java / org / opendaylight / controller / sal / restconf / impl / test / URITest.java
index 4e2f525d451787cc5f658495ff39e373cfaab22b..eef9e414e93e75d90ec29719d7f93b85952c9400 100644 (file)
@@ -1,3 +1,10 @@
+/*
+ * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
 package org.opendaylight.controller.sal.restconf.impl.test;
 
 import static org.junit.Assert.assertEquals;
@@ -47,8 +54,8 @@ public class URITest {
                 .toInstanceIdentifier("simple-nodes:userWithoutClass/foo");
         assertEquals(instanceIdentifier.getSchemaNode().getQName().getLocalName(), "userWithoutClass");
 
-        instanceIdentifier = controllerContext.toInstanceIdentifier("simple-nodes:userWithoutClass/foo/full-name");
-        assertEquals(instanceIdentifier.getSchemaNode().getQName().getLocalName(), "full-name");
+        instanceIdentifier = controllerContext.toInstanceIdentifier("simple-nodes:userWithoutClass/foo");
+        assertEquals(instanceIdentifier.getSchemaNode().getQName().getLocalName(), "userWithoutClass");
 
         instanceIdentifier = controllerContext.toInstanceIdentifier("simple-nodes:user/foo/boo");
         assertEquals(instanceIdentifier.getSchemaNode().getQName().getLocalName(), "user");
@@ -56,8 +63,6 @@ public class URITest {
         instanceIdentifier = controllerContext.toInstanceIdentifier("simple-nodes:user//boo");
         assertEquals(instanceIdentifier.getSchemaNode().getQName().getLocalName(), "user");
 
-        instanceIdentifier = controllerContext.toInstanceIdentifier("simple-nodes:users/user/foo");
-        assertEquals(instanceIdentifier.getSchemaNode().getQName().getLocalName(), "user");
     }
 
     @Test
@@ -85,8 +90,8 @@ public class URITest {
     @Test
     public void testToInstanceIdentifierChoice() throws FileNotFoundException {
         InstanceIdWithSchemaNode instanceIdentifier = controllerContext
-                .toInstanceIdentifier("simple-nodes:food/nonalcoholic/beer");
-        assertEquals(instanceIdentifier.getSchemaNode().getQName().getLocalName(), "beer");
+                .toInstanceIdentifier("simple-nodes:food/nonalcoholic");
+        assertEquals(instanceIdentifier.getSchemaNode().getQName().getLocalName(), "nonalcoholic");
     }
 
     @Test