Decouple config and netconf subsystems.
[controller.git] / opendaylight / netconf / netconf-notifications-impl / src / test / java / org / opendaylight / controller / netconf / notifications / impl / ops / GetTest.java
index 6f38f24f10c02e3e6dac9c7147fb24104f2ba9db..3fe5e5c7e5ac6c521902a1c9257444b41d9c5e4a 100644 (file)
@@ -8,15 +8,10 @@
 
 package org.opendaylight.controller.netconf.notifications.impl.ops;
 
-import static org.junit.Assert.assertTrue;
-
 import com.google.common.collect.Lists;
 import java.io.IOException;
-import org.custommonkey.xmlunit.Diff;
-import org.custommonkey.xmlunit.XMLUnit;
 import org.junit.Test;
-import org.opendaylight.controller.netconf.notifications.impl.ops.Get;
-import org.opendaylight.controller.netconf.util.xml.XmlUtil;
+import org.opendaylight.controller.config.util.xml.XmlUtil;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.notification._1._0.rev080714.StreamNameType;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netmod.notification.rev080714.netconf.Streams;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netmod.notification.rev080714.netconf.StreamsBuilder;
@@ -41,25 +36,23 @@ public class GetTest {
 
         final Document response = getBlankResponse();
         Get.serializeStreamsSubtree(response, streams);
-        final Diff diff = XMLUnit.compareXML(XmlUtil.toString(response),
+        NotificationsTransformUtilTest.compareXml(XmlUtil.toString(response),
                 "<rpc-reply message-id=\"101\" xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\">\n" +
-                "<data>\n" +
-                "<netconf xmlns=\"urn:ietf:params:xml:ns:netmod:notification\">\n" +
-                "<streams>\n" +
-                "<stream>\n" +
-                "<name>base</name>\n" +
-                "<description>description</description>\n" +
-                "<replaySupport>false</replaySupport>\n" +
-                "</stream>\n" +
-                "</streams>\n" +
-                "</netconf>\n" +
-                "</data>\n" +
-                "</rpc-reply>\n");
-
-        assertTrue(diff.toString(), diff.identical());
+                        "<data>\n" +
+                        "<netconf xmlns=\"urn:ietf:params:xml:ns:netmod:notification\">\n" +
+                        "<streams>\n" +
+                        "<stream>\n" +
+                        "<name>base</name>\n" +
+                        "<description>description</description>\n" +
+                        "<replaySupport>false</replaySupport>\n" +
+                        "</stream>\n" +
+                        "</streams>\n" +
+                        "</netconf>\n" +
+                        "</data>\n" +
+                        "</rpc-reply>\n");
     }
 
-    private Document getBlankResponse() throws IOException, SAXException {
+    private static Document getBlankResponse() throws IOException, SAXException {
 
         return XmlUtil.readXmlToDocument("<rpc-reply message-id=\"101\"\n" +
                 "xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\">\n" +