X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=openflowplugin-impl%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fopenflowplugin%2Fimpl%2Fstatistics%2Fservices%2Fdirect%2FAbstractDirectStatisticsServiceTest.java;fp=openflowplugin-impl%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fopenflowplugin%2Fimpl%2Fstatistics%2Fservices%2Fdirect%2FAbstractDirectStatisticsServiceTest.java;h=86f70f3b3b9ee23a83737749b288d7968384da7c;hb=13e1d5e6c0237b9378d60526dd8c1d79db6d2b49;hp=e793c8fd9d40028301fd5ae2d4f7185ab377bf9a;hpb=2bef52d5eb4c32ddd3d51be53760926ca2138f04;p=openflowplugin.git diff --git a/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/AbstractDirectStatisticsServiceTest.java b/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/AbstractDirectStatisticsServiceTest.java index e793c8fd9d..86f70f3b3b 100755 --- a/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/AbstractDirectStatisticsServiceTest.java +++ b/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/AbstractDirectStatisticsServiceTest.java @@ -12,7 +12,6 @@ import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.lenient; import static org.mockito.Mockito.when; -import java.math.BigInteger; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @@ -47,12 +46,15 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetFeaturesOutput; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier; +import org.opendaylight.yangtools.yang.common.Uint32; +import org.opendaylight.yangtools.yang.common.Uint64; +import org.opendaylight.yangtools.yang.common.Uint8; @RunWith(MockitoJUnitRunner.class) public abstract class AbstractDirectStatisticsServiceTest { - protected static final Long PORT_NO = 1L; - protected static final BigInteger DATAPATH_ID = BigInteger.TEN; - protected static final short OF_VERSION = OFConstants.OFP_VERSION_1_3; + protected static final Uint32 PORT_NO = Uint32.ONE; + protected static final Uint64 DATAPATH_ID = Uint64.valueOf(10); + protected static final Uint8 OF_VERSION = Uint8.valueOf(OFConstants.OFP_VERSION_1_3); protected static final String NODE_ID = "openflow:10"; @Mock @@ -89,7 +91,7 @@ public abstract class AbstractDirectStatisticsServiceTest { protected ConvertorManager convertorManager; protected MultipartWriterProvider multipartWriterProvider; - protected static NodeRef createNodeRef(String nodeIdValue) { + protected static NodeRef createNodeRef(final String nodeIdValue) { InstanceIdentifier nodePath = InstanceIdentifier.create(Nodes.class) .child(Node.class, new NodeKey(new NodeId(nodeIdValue))); @@ -117,7 +119,7 @@ public abstract class AbstractDirectStatisticsServiceTest { when(deviceContext.getDeviceInfo()).thenReturn(deviceInfo); when(deviceInfo.getNodeInstanceIdentifier()).thenReturn(nodeInstanceIdentifier); lenient().when(deviceInfo.getNodeId()).thenReturn(new NodeId(NODE_ID)); - when(deviceInfo.getVersion()).thenReturn(OF_VERSION); + when(deviceInfo.getVersion()).thenReturn(OF_VERSION.toJava()); when(deviceInfo.getDatapathId()).thenReturn(DATAPATH_ID); lenient().when(getFeaturesOutput.getVersion()).thenReturn(OF_VERSION); lenient().when(getFeaturesOutput.getDatapathId()).thenReturn(DATAPATH_ID);