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;
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;
private GetFeaturesOutput features;
@Mock
private BindingAwareBroker.ProviderContext providerContext;
+ @Mock
+ private NotificationEnqueuer notificationEnqueuer;
private ModelDrivenSwitch mdSwitchOF13;
@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)
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);
/**
- * 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() {
}
/**
- * 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();