Bug 1764 - moved Session related interfaces to openflowplugin-api
[openflowplugin.git] / openflowplugin / src / test / java / org / opendaylight / openflowplugin / openflow / md / core / sal / SalRegistrationManagerTest.java
index d74f303b32b7ec30dccb619b712c39ea011a221c..cbd180342952d532d4483ba4384f8130e53916b9 100644 (file)
@@ -12,10 +12,12 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 
 import com.google.common.util.concurrent.Futures;
+
 import java.math.BigInteger;
 import java.util.Collections;
 import java.util.Set;
 import java.util.concurrent.ExecutorService;
+
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -27,13 +29,14 @@ import org.opendaylight.controller.sal.binding.api.BindingAwareBroker;
 import org.opendaylight.controller.sal.binding.api.NotificationListener;
 import org.opendaylight.controller.sal.binding.api.NotificationProviderService;
 import org.opendaylight.controller.sal.common.util.Rpcs;
-import org.opendaylight.openflowplugin.openflow.md.ModelDrivenSwitch;
+import org.opendaylight.openflowplugin.api.openflow.md.ModelDrivenSwitch;
 import org.opendaylight.openflowplugin.api.OFConstants;
-import org.opendaylight.openflowplugin.openflow.md.core.ConnectionConductor;
+import org.opendaylight.openflowplugin.api.openflow.md.core.ConnectionConductor;
+import org.opendaylight.openflowplugin.api.openflow.md.core.NotificationEnqueuer;
 import org.opendaylight.openflowplugin.api.openflow.md.core.SwitchConnectionDistinguisher;
-import org.opendaylight.openflowplugin.openflow.md.core.session.IMessageDispatchService;
-import org.opendaylight.openflowplugin.openflow.md.core.session.SessionContext;
-import org.opendaylight.openflowplugin.openflow.md.core.session.SwitchSessionKeyOF;
+import org.opendaylight.openflowplugin.api.openflow.md.core.session.IMessageDispatchService;
+import org.opendaylight.openflowplugin.api.openflow.md.core.session.SessionContext;
+import org.opendaylight.openflowplugin.api.openflow.md.core.session.SwitchSessionKeyOF;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.UpdateFlowOutput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.UpdateFlowOutputBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
@@ -69,6 +72,8 @@ public class SalRegistrationManagerTest {
     private GetFeaturesOutput features;
     @Mock
     private BindingAwareBroker.ProviderContext providerContext;
+    @Mock
+    private NotificationEnqueuer notificationEnqueuer;
 
     private ModelDrivenSwitch mdSwitchOF13;
 
@@ -77,7 +82,6 @@ public class SalRegistrationManagerTest {
     @Before
     public void setUp() {
 
-
         Mockito.when(context.getPrimaryConductor()).thenReturn(conductor);
         Mockito.when(context.getMessageDispatchService()).thenReturn(messageDispatchService);
         Mockito.when(conductor.getVersion()).thenReturn(OFConstants.OFP_VERSION_1_0)
@@ -88,6 +92,7 @@ public class SalRegistrationManagerTest {
         registration = new CompositeObjectRegistration<>(mdSwitchOF13, Collections.EMPTY_LIST);
 
         Mockito.when(context.getProviderRegistration()).thenReturn(registration);
+        Mockito.when(context.getNotificationEnqueuer()).thenReturn(notificationEnqueuer);
         Mockito.when(features.getDatapathId()).thenReturn(BigInteger.valueOf(1));
         Mockito.when(features.getVersion()).thenReturn((short) 1);
 
@@ -144,7 +149,7 @@ public class SalRegistrationManagerTest {
 
 
     /**
-     * Test for {@link org.opendaylight.openflowplugin.openflow.md.core.sal.SalRegistrationManager#onSessionRemoved(org.opendaylight.openflowplugin.openflow.md.core.session.SessionContext)}
+     * Test for {@link org.opendaylight.openflowplugin.openflow.md.core.sal.SalRegistrationManager#onSessionRemoved(org.opendaylight.openflowplugin.api.openflow.md.core.session.SessionContext)}
      */
     @Test
     public void testOnSessionRemoved() {
@@ -152,7 +157,7 @@ public class SalRegistrationManagerTest {
     }
 
     /**
-     * Test for {@link org.opendaylight.openflowplugin.openflow.md.core.sal.SalRegistrationManager#onSessionAdded(org.opendaylight.openflowplugin.openflow.md.core.session.SwitchSessionKeyOF, org.opendaylight.openflowplugin.openflow.md.core.session.SessionContext)}
+     * Test for {@link org.opendaylight.openflowplugin.openflow.md.core.sal.SalRegistrationManager#onSessionAdded(org.opendaylight.openflowplugin.api.openflow.md.core.session.SwitchSessionKeyOF, org.opendaylight.openflowplugin.api.openflow.md.core.session.SessionContext)}
      */
     public void testOnAdded() {
         SwitchSessionKeyOF switchSessionKeyOF = new SwitchSessionKeyOF();