Increased unit test coverage for the rest of deserialization factories
[openflowjava.git] / openflow-protocol-impl / src / test / java / org / opendaylight / openflowjava / protocol / impl / deserialization / factories / OF10PacketInMessageFactoryTest.java
index a632ba4549882e0588cfe78146f92503d7dfa5fe..6238780614f17d2096f74e1a58cf87fb0aa19698 100644 (file)
@@ -56,4 +56,14 @@ public class OF10PacketInMessageFactoryTest {
         Assert.assertArrayEquals("Wrong data", ByteBufUtils.hexStringToBytes("01 02 03 04"), builtByFactory.getData());
     }
 
-}
+    /**
+     * Testing {@link OF10PacketInMessageFactory} for correct translation into POJO
+     */
+    @Test
+    public void testWithNoAdditionalData(){
+        ByteBuf bb = BufferHelper.buildBuffer("00 01 02 03 01 02 01 02 00 00");
+        PacketInMessage builtByFactory = BufferHelper.deserialize(packetInFactory, bb); 
+
+        Assert.assertNull("Wrong data", builtByFactory.getData());
+    }
+}
\ No newline at end of file