BUG-5574: sal-flows-batch proposal
[openflowplugin.git] / openflowplugin-impl / src / test / java / org / opendaylight / openflowplugin / impl / util / PathUtilTest.java
1 /*
2  * Copyright (c) 2016 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.openflowplugin.impl.util;
10
11 import org.junit.Assert;
12 import org.junit.Test;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey;
18 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
19
20 /**
21  * Test for {@link PathUtil}.
22  */
23 public class PathUtilTest {
24
25     public static final NodeId NODE_ID = new NodeId("ut-dummy-node");
26     public static final NodeKey NODE_KEY = new NodeKey(NODE_ID);
27     public static final NodeRef NODE_REF = new NodeRef(InstanceIdentifier.create(Nodes.class).child(Node.class, NODE_KEY));
28
29     @Test
30     public void testExtractNodeId() throws Exception {
31         Assert.assertEquals(NODE_ID, PathUtil.extractNodeId(NODE_REF));
32     }
33 }