Fix license header violations in sal-clustering-commons
[controller.git] / opendaylight / md-sal / sal-clustering-commons / src / test / java / org / opendaylight / controller / cluster / datastore / node / utils / QNameFactoryTest.java
1 /*
2  * Copyright (c) 2014, 2015 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.controller.cluster.datastore.node.utils;
10
11 import org.junit.Test;
12 import org.opendaylight.controller.cluster.datastore.util.TestModel;
13 import org.opendaylight.yangtools.yang.common.QName;
14
15 import static org.junit.Assert.assertEquals;
16 import static org.junit.Assert.assertFalse;
17 import static org.junit.Assert.assertTrue;
18
19 public class QNameFactoryTest {
20
21     @Test
22     public void testBasic(){
23         QName expected = TestModel.AUG_NAME_QNAME;
24         QName created = QNameFactory.create(expected.toString());
25
26         assertFalse( expected == created);
27
28         assertEquals(expected, created);
29
30         QName cached = QNameFactory.create(expected.toString());
31
32         assertEquals(expected, cached);
33
34         assertTrue( cached == created );
35     }
36
37 }