BUG-4084: Li:Save flows in operational based on barrier success
[openflowplugin.git] / openflowplugin-impl / src / test / java / org / opendaylight / openflowplugin / impl / rpc / RpcManagerImplTest.java
index aacc8e26290e52276658026c98b6050327d8f597..8923d4acf1356145495bfe224eec1177590165de 100644 (file)
@@ -23,6 +23,7 @@ import org.opendaylight.openflowplugin.api.openflow.connection.ConnectionContext
 import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
 import org.opendaylight.openflowplugin.api.openflow.device.DeviceState;
 import org.opendaylight.openflowplugin.api.openflow.device.handlers.DeviceInitializationPhaseHandler;
+import org.opendaylight.openflowplugin.api.openflow.registry.ItemLifeCycleRegistry;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeContext;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes;
@@ -51,6 +52,9 @@ public class RpcManagerImplTest {
     private BindingAwareBroker.RoutedRpcRegistration<RpcService> routedRpcRegistration;
     @Mock
     private DeviceState deviceState;
+    @Mock
+    private ItemLifeCycleRegistry itemLifeCycleRegistry;
+
     private KeyedInstanceIdentifier<Node, NodeKey> nodePath;
 
     @Before
@@ -64,6 +68,7 @@ public class RpcManagerImplTest {
         Mockito.when(connectionContext.getFeatures()).thenReturn(features);
         Mockito.when(deviceContext.getPrimaryConnectionContext()).thenReturn(connectionContext);
         Mockito.when(deviceContext.getDeviceState()).thenReturn(deviceState);
+        Mockito.when(deviceContext.getItemLifeCycleSourceRegistry()).thenReturn(itemLifeCycleRegistry);
         Mockito.when(deviceState.getNodeInstanceIdentifier()).thenReturn(nodePath);
     }