DeviceState changes
[openflowplugin.git] / openflowplugin-impl / src / test / java / org / opendaylight / openflowplugin / impl / statistics / services / direct / AbstractDirectStatisticsServiceTest.java
index 7263b980c7841715982f7bbe0b032355e22ec180..ac20355da025133340165830708bff5620a7dc60 100644 (file)
@@ -17,6 +17,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.RequestContextStack;
 import org.opendaylight.openflowplugin.api.openflow.device.TranslatorLibrary;
@@ -67,7 +68,7 @@ public abstract class AbstractDirectStatisticsServiceTest {
     @Mock
     protected DeviceState deviceState;
     @Mock
-    protected GetFeaturesOutput getFeaturesOutput;
+    protected DeviceInfo deviceInfo;
 
     protected NodeConnectorId nodeConnectorId;
     protected KeyedInstanceIdentifier<Node, NodeKey> nodeInstanceIdentifier;
@@ -95,13 +96,11 @@ public abstract class AbstractDirectStatisticsServiceTest {
         when(deviceContext.getMultiMsgCollector(any())).thenReturn(multiMsgCollector);
         when(deviceContext.oook()).thenReturn(translatorLibrary);
         when(deviceContext.getDeviceState()).thenReturn(deviceState);
-        when(deviceContext.getDeviceState()).thenReturn(deviceState);
-        when(deviceState.getNodeInstanceIdentifier()).thenReturn(nodeInstanceIdentifier);
-        when(deviceState.getNodeId()).thenReturn(new NodeId(NODE_ID));
-        when(deviceState.getVersion()).thenReturn(OF_VERSION);
-        when(deviceState.getFeatures()).thenReturn(getFeaturesOutput);
-        when(getFeaturesOutput.getVersion()).thenReturn(OF_VERSION);
-        when(getFeaturesOutput.getDatapathId()).thenReturn(DATAPATH_ID);
+        when(deviceContext.getDeviceInfo()).thenReturn(deviceInfo);
+        when(deviceInfo.getNodeInstanceIdentifier()).thenReturn(nodeInstanceIdentifier);
+        when(deviceInfo.getNodeId()).thenReturn(new NodeId(NODE_ID));
+        when(deviceInfo.getVersion()).thenReturn(OF_VERSION);
+        when(deviceInfo.getDatapathId()).thenReturn(DATAPATH_ID);
         when(connectionContext.getFeatures()).thenReturn(features);
         when(connectionContext.getOutboundQueueProvider()).thenReturn(outboundQueueProvider);
         when(features.getVersion()).thenReturn(OF_VERSION);