Bug 5596 Cleaning part 1
[openflowplugin.git] / openflowplugin-impl / src / test / java / org / opendaylight / openflowplugin / impl / LifecycleConductorImplTest.java
index 99a1cf4ce51b11e4c21dd51b206262c63edb85ae..723cb79723a2cb5ee74f1ba8a83f4ce2bbb66456 100644 (file)
@@ -27,6 +27,7 @@ import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.openflowplugin.api.openflow.OFPContext;
 import org.opendaylight.openflowplugin.api.openflow.connection.ConnectionContext;
 import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
 import org.opendaylight.openflowplugin.api.openflow.device.DeviceInfo;
@@ -109,7 +110,6 @@ public class LifecycleConductorImplTest {
         when(deviceInfo.getDatapathId()).thenReturn(BigInteger.TEN);
         when(deviceInfo.getNodeInstanceIdentifier()).thenReturn(nodeInstanceIdentifier);
         when(deviceContext.getDeviceInfo()).thenReturn(deviceInfo);
-        when(rpcManager.gainContext(Mockito.any())).thenReturn(rpcContext);
     }
 
     @Test
@@ -183,7 +183,6 @@ public class LifecycleConductorImplTest {
         when(deviceContext.getDeviceState()).thenReturn(deviceState);
         when(deviceContext.getDeviceFlowRegistry()).thenReturn(new DeviceFlowRegistryImpl(dataBroker, nodeInstanceIdentifier));
         when(deviceManager.gainContext(deviceInfo)).thenReturn(deviceContext);
-        when(deviceManager.onClusterRoleChange(deviceInfo, OfpRole.BECOMEMASTER)).thenReturn(listenableFuture);
         lifecycleConductor.roleChangeOnDevice(deviceInfo,OfpRole.BECOMEMASTER);
         verify(statisticsManager).startScheduling(Mockito.<DeviceInfo>any());
     }
@@ -198,7 +197,6 @@ public class LifecycleConductorImplTest {
         when(deviceContext.getDeviceState()).thenReturn(deviceState);
         when(deviceContext.getDeviceFlowRegistry()).thenReturn(new DeviceFlowRegistryImpl(dataBroker, nodeInstanceIdentifier));
         when(deviceManager.gainContext(deviceInfo)).thenReturn(deviceContext);
-        when(deviceManager.onClusterRoleChange(deviceInfo, OfpRole.BECOMESLAVE)).thenReturn(listenableFuture);
 
         lifecycleConductor.roleChangeOnDevice(deviceInfo,OfpRole.BECOMESLAVE);
         verify(statisticsManager).stopScheduling(Mockito.<DeviceInfo>any());