Merge "Bug 2160: Added concurrent 3-phase commit coordinator"
[controller.git] / opendaylight / netconf / netconf-impl / src / test / java / org / opendaylight / controller / netconf / impl / MessageParserTest.java
index d1c0b066d7a0a5ef15399a0544deb380177b0b01..abf2ad862f779cb5651f200fb484138482bbb5c0 100644 (file)
@@ -8,26 +8,26 @@
 
 package org.opendaylight.controller.netconf.impl;
 
+import static org.custommonkey.xmlunit.XMLAssert.assertXMLEqual;
 import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
+
 import io.netty.buffer.ByteBuf;
 import io.netty.buffer.Unpooled;
 import io.netty.channel.embedded.EmbeddedChannel;
-
 import java.util.Queue;
-
 import org.junit.Before;
 import org.junit.Test;
 import org.opendaylight.controller.netconf.api.NetconfMessage;
-import org.opendaylight.controller.netconf.util.handler.ChunkedFramingMechanismEncoder;
-import org.opendaylight.controller.netconf.util.handler.FramingMechanismHandlerFactory;
-import org.opendaylight.controller.netconf.util.handler.NetconfChunkAggregator;
-import org.opendaylight.controller.netconf.util.handler.NetconfEOMAggregator;
-import org.opendaylight.controller.netconf.util.handler.NetconfMessageToXMLEncoder;
-import org.opendaylight.controller.netconf.util.handler.NetconfXMLToMessageDecoder;
+import org.opendaylight.controller.netconf.nettyutil.handler.ChunkedFramingMechanismEncoder;
+import org.opendaylight.controller.netconf.nettyutil.handler.FramingMechanismHandlerFactory;
+import org.opendaylight.controller.netconf.nettyutil.handler.NetconfChunkAggregator;
+import org.opendaylight.controller.netconf.nettyutil.handler.NetconfEOMAggregator;
+import org.opendaylight.controller.netconf.nettyutil.handler.NetconfMessageToXMLEncoder;
+import org.opendaylight.controller.netconf.nettyutil.handler.NetconfXMLToMessageDecoder;
 import org.opendaylight.controller.netconf.util.messages.FramingMechanism;
 import org.opendaylight.controller.netconf.util.messages.NetconfMessageConstants;
 import org.opendaylight.controller.netconf.util.messages.NetconfMessageHeader;
@@ -87,7 +87,7 @@ public class MessageParserTest {
 
         NetconfMessage receivedMessage = (NetconfMessage) testChunkChannel.readInbound();
         assertNotNull(receivedMessage);
-        assertTrue(this.msg.getDocument().isEqualNode(receivedMessage.getDocument()));
+        assertXMLEqual(this.msg.getDocument(), receivedMessage.getDocument());
     }
 
     @Test
@@ -106,6 +106,6 @@ public class MessageParserTest {
         testChunkChannel.writeInbound(recievedOutbound);
         NetconfMessage receivedMessage = (NetconfMessage) testChunkChannel.readInbound();
         assertNotNull(receivedMessage);
-        assertTrue(this.msg.getDocument().isEqualNode(receivedMessage.getDocument()));
+        assertXMLEqual(this.msg.getDocument(), receivedMessage.getDocument());
     }
 }