Migrate openflow-protocol-impl tests to Uint types
[openflowplugin.git] / openflowjava / openflow-protocol-impl / src / test / java / org / opendaylight / openflowjava / protocol / impl / serialization / factories / PortStatusMessageFactoryTest.java
index 79ed523ea989be72a737ee029ae118b0127c3f92..30f392edb67dac8c3a0c200b9e93d98a73243f50 100644 (file)
@@ -26,6 +26,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev13
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortState;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PortStatusMessage;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PortStatusMessageBuilder;
+import org.opendaylight.yangtools.yang.common.Uint32;
 
 /**
  * Unit tests for PortStatusMessageFactory.
@@ -52,7 +53,7 @@ public class PortStatusMessageFactoryTest {
         PortStatusMessageBuilder builder = new PortStatusMessageBuilder();
         BufferHelper.setupHeader(builder, EncodeConstants.OF13_VERSION_ID);
         builder.setReason(PortReason.forValue(1));
-        builder.setPortNo(1L);
+        builder.setPortNo(Uint32.ONE);
         builder.setHwAddr(new MacAddress("94:de:80:a6:61:40"));
         builder.setName("Port name");
         builder.setConfig(new PortConfig(true, false, true, false));
@@ -65,8 +66,8 @@ public class PortStatusMessageFactoryTest {
                 true, false, true, false, true, false));
         builder.setPeerFeatures(new PortFeatures(true, false, true, false, true, false, true, false, true, false, true,
                 false, true, false, true, false));
-        builder.setCurrSpeed(1234L);
-        builder.setMaxSpeed(1234L);
+        builder.setCurrSpeed(Uint32.valueOf(1234));
+        builder.setMaxSpeed(Uint32.valueOf(1234));
         PortStatusMessage message = builder.build();
 
         ByteBuf serializedBuffer = UnpooledByteBufAllocator.DEFAULT.buffer();