Merge "Bug 1576: Handle remote failures for write Tx async"
[controller.git] / opendaylight / md-sal / sal-clustering-commons / src / test / java / org / opendaylight / controller / cluster / datastore / node / utils / QNameFactoryTest.java
1 package org.opendaylight.controller.cluster.datastore.node.utils;
2
3 import org.junit.Test;
4 import org.opendaylight.controller.cluster.datastore.util.TestModel;
5 import org.opendaylight.yangtools.yang.common.QName;
6
7 import static junit.framework.Assert.assertTrue;
8 import static junit.framework.TestCase.assertEquals;
9 import static org.junit.Assert.assertFalse;
10
11 public class QNameFactoryTest {
12
13     @Test
14     public void testBasic(){
15         QName expected = TestModel.AUG_NAME_QNAME;
16         QName created = QNameFactory.create(expected.toString());
17
18         assertFalse( expected == created);
19
20         assertEquals(expected, created);
21
22         QName cached = QNameFactory.create(expected.toString());
23
24         assertEquals(expected, cached);
25
26         assertTrue( cached == created );
27     }
28
29 }