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
@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
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