Merge "BUG-1274 OF issue with datapath-id"
[controller.git] / opendaylight / md-sal / compatibility / sal-compatibility / src / test / java / org / opendaylight / controller / sal / compatibility / test / NodeMappingTest.java
index 8a23ebc933b54359ed7f4dc0d5b4786c05a17d21..cef7ae7a427672b8276411b2e1ace77f66dc04fd 100644 (file)
@@ -174,6 +174,18 @@ public class NodeMappingTest {
         Assert.assertEquals("openflow:1", observedNodeConnectorId);
     }
 
+    /**
+     * Test method for
+     * {@link org.opendaylight.controller.sal.compatibility.NodeMapping#openflowFullNodeIdToLong(String)}
+     * .
+     * @throws ConstructionException
+     */
+    @Test
+    public void testOpenflowFullNodeIdToLong() throws ConstructionException {
+        Assert.assertEquals(42L, NodeMapping.openflowFullNodeIdToLong("42").longValue());
+        Assert.assertEquals(0xCC4E241C4A000000L, NodeMapping.openflowFullNodeIdToLong("14721743935839928320").longValue());
+    }
+
     /**
      * @param nodeId
      * @param portId