Merge "fix failure during connecting device when channelActive happens later than...
[netconf.git] / netconf / netconf-netty-util / src / test / java / org / opendaylight / netconf / nettyutil / handler / NetconfHelloMessageToXMLEncoderTest.java
index 7eaceff6697ccc31fe8d37f8dcaa0cefb9580560..899208a6702c2bb7b55f96affa5e3e6eae9fe260 100644 (file)
@@ -19,10 +19,10 @@ import org.junit.Before;
 import org.junit.Test;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
-import org.opendaylight.controller.config.util.xml.XmlUtil;
 import org.opendaylight.netconf.api.NetconfMessage;
 import org.opendaylight.netconf.api.messages.NetconfHelloMessage;
 import org.opendaylight.netconf.api.messages.NetconfHelloMessageAdditionalHeader;
+import org.opendaylight.netconf.api.xml.XmlUtil;
 
 public class NetconfHelloMessageToXMLEncoderTest {
 
@@ -36,7 +36,8 @@ public class NetconfHelloMessageToXMLEncoderTest {
 
     @Test
     public void testEncode() throws Exception {
-        final NetconfMessage msg = new NetconfHelloMessage(XmlUtil.readXmlToDocument("<hello xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\"/>"),
+        final NetconfMessage msg = new NetconfHelloMessage(XmlUtil.readXmlToDocument(
+                "<hello xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\"/>"),
                 NetconfHelloMessageAdditionalHeader.fromString("[tomas;10.0.0.0:10000;tcp;client;]"));
         final ByteBuf destination = Unpooled.buffer();
         new NetconfHelloMessageToXMLEncoder().encode(ctx, msg, destination);
@@ -48,7 +49,8 @@ public class NetconfHelloMessageToXMLEncoderTest {
 
     @Test
     public void testEncodeNoHeader() throws Exception {
-        final NetconfMessage msg = new NetconfHelloMessage(XmlUtil.readXmlToDocument("<hello xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\"/>"));
+        final NetconfMessage msg = new NetconfHelloMessage(XmlUtil.readXmlToDocument(
+                "<hello xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\"/>"));
         final ByteBuf destination = Unpooled.buffer();
         new NetconfHelloMessageToXMLEncoder().encode(ctx, msg, destination);
 
@@ -59,7 +61,8 @@ public class NetconfHelloMessageToXMLEncoderTest {
 
     @Test(expected = IllegalStateException.class)
     public void testEncodeNotHello() throws Exception {
-        final NetconfMessage msg = new NetconfMessage(XmlUtil.readXmlToDocument("<hello xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\"/>"));
+        final NetconfMessage msg = new NetconfMessage(XmlUtil.readXmlToDocument(
+                "<hello xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\"/>"));
         new NetconfHelloMessageToXMLEncoder().encode(ctx, msg, null);
     }
-}
\ No newline at end of file
+}