X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=openflowplugin-impl%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fopenflowplugin%2Fimpl%2Fstatistics%2Fservices%2FAbstractStatsServiceTest.java;h=bd25110f4a528f2efaa7e5cf161251c1b6130ab7;hb=d10c556113e37e0cb9fa08ed47932f72ba454ee3;hp=a3480ed9ad9775bdc4890d643e19b9a7b4c59bb3;hpb=52f1d136aff5568e9d9607e6a61e4ec128c962aa;p=openflowplugin.git diff --git a/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/AbstractStatsServiceTest.java b/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/AbstractStatsServiceTest.java index a3480ed9ad..bd25110f4a 100644 --- a/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/AbstractStatsServiceTest.java +++ b/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/AbstractStatsServiceTest.java @@ -22,6 +22,7 @@ import org.opendaylight.openflowjava.protocol.api.connection.OutboundQueue; import org.opendaylight.openflowplugin.api.OFConstants; import org.opendaylight.openflowplugin.api.openflow.connection.ConnectionContext; import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext; +import org.opendaylight.openflowplugin.api.openflow.device.DeviceInfo; import org.opendaylight.openflowplugin.api.openflow.device.DeviceState; import org.opendaylight.openflowplugin.api.openflow.device.RequestContext; import org.opendaylight.openflowplugin.api.openflow.device.RequestContextStack; @@ -64,6 +65,8 @@ public abstract class AbstractStatsServiceTest { protected TranslatorLibrary translatorLibrary; @Mock protected DeviceState deviceState; + @Mock + protected DeviceInfo deviceInfo; public static final NodeId NODE_ID = new NodeId("unit-test-node:123"); @@ -91,9 +94,10 @@ public abstract class AbstractStatsServiceTest { Mockito.when(deviceContext.getMultiMsgCollector(Matchers.any(RequestContext.class))).thenReturn(multiMsgCollector); Mockito.when(deviceContext.oook()).thenReturn(translatorLibrary); Mockito.when(deviceContext.getDeviceState()).thenReturn(deviceState); - Mockito.when(deviceState.getNodeId()).thenReturn(NODE_ID); - Mockito.when(deviceState.getVersion()).thenReturn(OFConstants.OFP_VERSION_1_3); - Mockito.when(deviceState.getFeatures()).thenReturn(getFeaturesOutput); + Mockito.when(deviceContext.getDeviceInfo()).thenReturn(deviceInfo); + Mockito.when(deviceInfo.getNodeId()).thenReturn(NODE_ID); + Mockito.when(deviceInfo.getVersion()).thenReturn(OFConstants.OFP_VERSION_1_3); + Mockito.when(deviceInfo.getDatapathId()).thenReturn(BigInteger.TEN); Mockito.when(connectionContext.getFeatures()).thenReturn(features); Mockito.when(connectionContext.getOutboundQueueProvider()).thenReturn(outboundQueueProvider); Mockito.when(features.getVersion()).thenReturn(OFConstants.OFP_VERSION_1_3);