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;
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.
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
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
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());