Remove dependency on controller config-util
[netconf.git] / netconf / netconf-util / src / test / java / org / opendaylight / netconf / util / NetconfUtilTest.java
index 5a7941ad7af0f33fd9b9751fd41fdf8ab05f8e84..1a8ebca07dc656a7fb4a50a7300698ad4bcab6b2 100644 (file)
@@ -18,8 +18,8 @@ import org.custommonkey.xmlunit.XMLUnit;
 import org.junit.Assert;
 import org.junit.BeforeClass;
 import org.junit.Test;
-import org.opendaylight.controller.config.util.xml.XmlUtil;
 import org.opendaylight.mdsal.binding.generator.impl.ModuleInfoBackedContext;
+import org.opendaylight.netconf.api.xml.XmlUtil;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.monitoring.rev101004.$YangModuleInfoImpl;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.monitoring.rev101004.NetconfState;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.monitoring.rev101004.netconf.state.Sessions;
@@ -44,8 +44,9 @@ public class NetconfUtilTest {
 
     @Test
     public void testConflictingVersionDetection() throws Exception {
-        final Document document = XmlUtil.readXmlToDocument(getClass().getResourceAsStream("/netconfMessages/conflictingversion/conflictingVersionResponse.xml"));
-        try{
+        final Document document = XmlUtil.readXmlToDocument(getClass()
+                .getResourceAsStream("/netconfMessages/conflictingversion/conflictingVersionResponse.xml"));
+        try {
             NetconfUtil.checkIsMessageOk(document);
             fail();
         } catch (final IllegalStateException e) {
@@ -58,12 +59,13 @@ public class NetconfUtilTest {
         final ModuleInfoBackedContext moduleInfoBackedContext = ModuleInfoBackedContext.create();
         moduleInfoBackedContext.addModuleInfos(Collections.singletonList($YangModuleInfoImpl.getInstance()));
         final SchemaContext context = moduleInfoBackedContext.getSchemaContext();
-        final LeafNode username = Builders.leafBuilder()
+        final LeafNode<?> username = Builders.leafBuilder()
                 .withNodeIdentifier(new YangInstanceIdentifier.NodeIdentifier(QName.create(Session.QNAME, "username")))
                 .withValue("admin")
                 .build();
         final MapEntryNode session1 = Builders.mapEntryBuilder()
-                .withNodeIdentifier(new YangInstanceIdentifier.NodeIdentifierWithPredicates(Session.QNAME, QName.create(Session.QNAME, "session-id"), 1L))
+                .withNodeIdentifier(new YangInstanceIdentifier
+                        .NodeIdentifierWithPredicates(Session.QNAME, QName.create(Session.QNAME, "session-id"), 1L))
                 .withChild(username)
                 .build();
         final MapNode sessionList = Builders.mapBuilder()