GroupId and MeterId used in model (as requested)
[openflowjava.git] / openflow-protocol-impl / src / test / java / org / opendaylight / openflowjava / protocol / impl / serialization / factories / GroupModInputMessageFactoryTest.java
index b90df4e3e5c589bbe257fef9f8ead4fdde094dbd..dbfada40b455d3af66eca6c4d1f9c8d287cb6993 100644 (file)
@@ -12,6 +12,7 @@ import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.impl.deserialization.factories.HelloMessageFactoryTest;\r
 import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;\r
 import org.opendaylight.openflowjava.protocol.impl.util.EncodeConstants;\r
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.GroupId;\r
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.GroupModCommand;\r
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.GroupType;\r
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortNumber;\r
@@ -37,7 +38,7 @@ public class GroupModInputMessageFactoryTest {
         BufferHelper.setupHeader(builder, EncodeConstants.OF13_VERSION_ID);\r
         builder.setCommand(GroupModCommand.forValue(2));\r
         builder.setType(GroupType.forValue(3));\r
-        builder.setGroupId(256L);\r
+        builder.setGroupId(new GroupId(256L));\r
         List<BucketsList> exp = createBucketsList();\r
         builder.setBucketsList(exp);\r
         GroupModInput message = builder.build();\r
@@ -50,7 +51,7 @@ public class GroupModInputMessageFactoryTest {
         Assert.assertEquals("Wrong command", message.getCommand().getIntValue(), out.readUnsignedShort());\r
         Assert.assertEquals("Wrong type", message.getType().getIntValue(), out.readUnsignedByte());\r
         out.skipBytes(PADDING_IN_GROUP_MOD_MESSAGE);\r
-        Assert.assertEquals("Wrong groupId", message.getGroupId().intValue(), out.readUnsignedInt());\r
+        Assert.assertEquals("Wrong groupId", message.getGroupId().getValue().intValue(), out.readUnsignedInt());\r
         List<BucketsList> rec = createBucketsListFromBufer(out);\r
         Assert.assertArrayEquals("Wrong bucketList", exp.toArray(), rec.toArray());\r
     }\r