Factory tests back to stable
[openflowjava.git] / openflow-protocol-impl / src / test / java / org / opendaylight / openflowjava / protocol / impl / deserialization / factories / FeaturesReplyMessageFactoryTest.java
index 3aa99e1e8f8051d2e964ca7d2b3729718913f90a..bf2bc82fbcac7c5a4e086f2fdcfdb66148715080 100644 (file)
@@ -6,6 +6,7 @@ import io.netty.buffer.ByteBuf;
 import org.junit.Assert;\r
 import org.junit.Test;\r
 import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;\r
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.Capabilities;\r
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetFeaturesOutput;\r
 \r
 /**\r
@@ -20,7 +21,7 @@ public class FeaturesReplyMessageFactoryTest {
     @Test\r
     public void test() {\r
         ByteBuf bb = BufferHelper.buildBuffer("00 01 02 03 04 05 06 07 00 01 02 03 01 01 00 00 00"\r
-                + " 01 02 03 00 01 02 03");\r
+                + " 00 01 41 00 01 02 03");\r
         GetFeaturesOutput builtByFactory = BufferHelper.decodeV13(\r
                 FeaturesReplyMessageFactory.getInstance(), bb);\r
 \r
@@ -29,9 +30,7 @@ public class FeaturesReplyMessageFactoryTest {
         Assert.assertEquals("Wrong buffers", 0x00010203L, builtByFactory.getBuffers().longValue());\r
         Assert.assertEquals("Wrong number of tables", 0x01, builtByFactory.getTables().shortValue());\r
         Assert.assertEquals("Wrong auxiliaryId", 0x01, builtByFactory.getAuxiliaryId().shortValue());\r
-        \r
-        //TODO - fix test\r
-        //Assert.assertEquals("Wrong capabilities", 0x00010203L, builtByFactory.getCapabilities().longValue());\r
+        Assert.assertEquals("Wrong capabilities", new Capabilities(true, false, false, true, false, true, false), builtByFactory.getCapabilities());\r
         Assert.assertEquals("Wrong reserved", 0x00010203L, builtByFactory.getReserved().longValue());\r
     }\r
 }\r