Bump MRI upstreams
[openflowplugin.git] / openflowjava / openflow-protocol-impl / src / test / java / org / opendaylight / openflowjava / protocol / impl / deserialization / factories / multipart / MultipartReplyFlowTest.java
index 9091dbcc1552c6313746c1a240377600a5fded93..7fbeff4b1d404f889889031b749e685b485ea363 100644 (file)
@@ -43,7 +43,7 @@ public class MultipartReplyFlowTest {
         DeserializerRegistry registry = new DeserializerRegistryImpl();
         registry.init();
         factory = registry.getDeserializer(
-                new MessageCodeKey(EncodeConstants.OF13_VERSION_ID, 19, MultipartReplyMessage.class));
+                new MessageCodeKey(EncodeConstants.OF_VERSION_1_3, 19, MultipartReplyMessage.class));
     }
 
     /**
@@ -56,10 +56,10 @@ public class MultipartReplyFlowTest {
 
         BufferHelper.checkHeaderV13(builtByFactory);
         Assert.assertEquals("Wrong type", 0x01, builtByFactory.getType().getIntValue());
-        Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().isOFPMPFREQMORE());
+        Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().getOFPMPFREQMORE());
         MultipartReplyFlowCase messageCase = (MultipartReplyFlowCase) builtByFactory.getMultipartReplyBody();
         MultipartReplyFlow message = messageCase.getMultipartReplyFlow();
-        Assert.assertEquals("Wrong flow stats size", 0, message.getFlowStats().size());
+        Assert.assertEquals("Wrong flow stats size", 0, message.nonnullFlowStats().size());
     }
 
     /**
@@ -67,36 +67,36 @@ public class MultipartReplyFlowTest {
      */
     @Test
     public void testMultipartReplyFlowBody() {
-        ByteBuf bb = BufferHelper.buildBuffer("00 01 00 01 00 00 00 00 " //
+        ByteBuf bb = BufferHelper.buildBuffer("00 01 00 01 00 00 00 00 " //
                                               // first flow stat
-                                              "00 48 08 00 " + // length, tableId, padding
-                                              "00 00 00 09 " + //durationSec
-                                              "00 00 00 07 " + //durationNsec
-                                              "00 0C 00 0E 00 0F 00 1F " + //priority, idleTimeout, hardTimeout, flags
-                                              "00 00 00 00 " + //pad_02
-                                              "FF 01 01 01 01 01 01 01 " + //cookie
-                                              "EF 01 01 01 01 01 01 01 " + //packetCount
-                                              "7F 01 01 01 01 01 01 01 " + //byteCount
-                                              "00 01 00 04 00 00 00 00 " + //empty match
-                                              "00 01 00 08 06 00 00 00 " + //
-                                              "00 01 00 08 06 00 00 00 " + //
+                                              + "00 48 08 00 " // length, tableId, padding
+                                              + "00 00 00 09 " //durationSec
+                                              + "00 00 00 07 " //durationNsec
+                                              + "00 0C 00 0E 00 0F 00 1F " //priority, idleTimeout, hardTimeout, flags
+                                              + "00 00 00 00 " //pad_02
+                                              + "FF 01 01 01 01 01 01 01 " //cookie
+                                              + "EF 01 01 01 01 01 01 01 " //packetCount
+                                              + "7F 01 01 01 01 01 01 01 " //byteCount
+                                              + "00 01 00 04 00 00 00 00 " //empty match
+                                              + "00 01 00 08 06 00 00 00 " //
+                                              + "00 01 00 08 06 00 00 00 " //
                                               // second flow stat
-                                              "00 48 08 00 " + // length, tableId, padding
-                                              "00 00 00 09 " + //durationSec
-                                              "00 00 00 07 " + //durationNsec
-                                              "00 0C 00 0E 00 0F 00 00 " + // priority, idleTimeout, hardTimeout, flags
-                                              "00 00 00 00 " + //pad_02
-                                              "FF 01 01 01 01 01 01 01 " + //cookie
-                                              "EF 01 01 01 01 01 01 01 " + //packetCount
-                                              "7F 01 01 01 01 01 01 01 " + //byteCount
-                                              "00 01 00 04 00 00 00 00 " + //empty match
-                                              "00 01 00 08 06 00 00 00 " + //
-                                              "00 01 00 08 06 00 00 00");
+                                              + "00 48 08 00 " // length, tableId, padding
+                                              + "00 00 00 09 " //durationSec
+                                              + "00 00 00 07 " //durationNsec
+                                              + "00 0C 00 0E 00 0F 00 00 " // priority, idleTimeout, hardTimeout, flags
+                                              + "00 00 00 00 " //pad_02
+                                              + "FF 01 01 01 01 01 01 01 " //cookie
+                                              + "EF 01 01 01 01 01 01 01 " //packetCount
+                                              + "7F 01 01 01 01 01 01 01 " //byteCount
+                                              + "00 01 00 04 00 00 00 00 " //empty match
+                                              + "00 01 00 08 06 00 00 00 " //
+                                              "00 01 00 08 06 00 00 00");
         MultipartReplyMessage builtByFactory = BufferHelper.deserialize(factory, bb);
 
         BufferHelper.checkHeaderV13(builtByFactory);
         Assert.assertEquals("Wrong type", 0x01, builtByFactory.getType().getIntValue());
-        Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().isOFPMPFREQMORE());
+        Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().getOFPMPFREQMORE());
         MultipartReplyFlowCase messageCase = (MultipartReplyFlowCase) builtByFactory.getMultipartReplyBody();
         MultipartReplyFlow message = messageCase.getMultipartReplyFlow();
         Assert.assertEquals("Wrong flow stats size", 2, message.getFlowStats().size());