Bump mdsal to 5.0.2
[openflowplugin.git] / openflowplugin-impl / src / test / java / org / opendaylight / openflowplugin / impl / util / PortTranslatorUtilTest.java
index 3a8e57c6334a2e6dde6044dfc67fae4f79754a4c..3bb435233e1880e79df05ad12640b9edd3642c7e 100644 (file)
@@ -12,7 +12,6 @@ import static org.junit.Assert.assertNotNull;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
-import java.math.BigInteger;
 import org.junit.Test;
 import org.opendaylight.openflowplugin.api.openflow.md.util.OpenflowVersion;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress;
@@ -23,6 +22,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev13
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortFeaturesV10;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortState;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PortGrouping;
+import org.opendaylight.yangtools.yang.common.Uint32;
+import org.opendaylight.yangtools.yang.common.Uint64;
 
 /**
  * Created by Martin Bobak mbobak@cisco.com on 7/29/14.
@@ -39,8 +40,8 @@ public class PortTranslatorUtilTest {
     private final boolean[] portCfgBools = {false, false, false, false};
     private final boolean[] portCfgV10bools = {false, false, false, false, false, false, false};
     private final boolean[] portStateBools = {false, false, false, false};
-    private final Long currentSpeed = Long.decode("4294967295");
-    private static final Long MAX_SPEED = Long.decode("4294967295");
+    private final Uint32 currentSpeed = Uint32.valueOf(4294967295L);
+    private static final Uint32 MAX_SPEED = Uint32.valueOf(4294967295L);
 
     /**
      * Test  method for
@@ -101,8 +102,8 @@ public class PortTranslatorUtilTest {
 
         Short version = OpenflowVersion.OF10.getVersion();
 
-        BigInteger dataPathId = BigInteger.ONE;
-        Long portNumber = 4294967295L;
+        Uint64 dataPathId = Uint64.ONE;
+        Uint32 portNumber = Uint32.valueOf(4294967295L);
         PortGrouping portGrouping = mockPortGrouping();
 
         NodeConnectorUpdated nodeConnectorUpdated = PortTranslatorUtil
@@ -133,7 +134,7 @@ public class PortTranslatorUtilTest {
         when(portGrouping.getMaxSpeed()).thenReturn(MAX_SPEED);
         when(portGrouping.getPeerFeatures()).thenReturn(getPortFeatures());
         when(portGrouping.getPeerFeaturesV10()).thenReturn(getPortFeaturesV10());
-        when(portGrouping.getPortNo()).thenReturn(Long.MAX_VALUE);
+        when(portGrouping.getPortNo()).thenReturn(Uint32.MAX_VALUE);
         when(portGrouping.getState()).thenReturn(getPortState());
         when(portGrouping.getSupportedFeatures()).thenReturn(getPortFeatures());
         when(portGrouping.getSupportedFeaturesV10()).thenReturn(getPortFeaturesV10());