Fix comparison between port numbers in match
[openflowplugin.git] / openflowplugin-impl / src / test / java / org / opendaylight / openflowplugin / impl / device / DeviceContextImplTest.java
index c2271fceb9d7a10b88ef09076d0ac5738fa6bf44..e5a3167bc5ab581e4ad722f752e958c669d2525c 100644 (file)
@@ -476,7 +476,7 @@ public class DeviceContextImplTest {
                 .thenReturn(flowRemovedMdsalBld.build());
 
         // insert flow+flowId into local registry
-        final FlowRegistryKey flowRegKey = FlowRegistryKeyFactory.create(flowRemovedMdsalBld.build());
+        final FlowRegistryKey flowRegKey = FlowRegistryKeyFactory.create(deviceInfo.getVersion(), flowRemovedMdsalBld.build());
         final FlowDescriptor flowDescriptor = FlowDescriptorFactory.create((short) 0, new FlowId("ut-ofp:f456"));
         deviceContext.getDeviceFlowRegistry().store(flowRegKey, flowDescriptor);
 
@@ -495,15 +495,14 @@ public class DeviceContextImplTest {
                 .child(Table.class, new TableKey((short) 0))
                 .child(Flow.class, new FlowKey(new FlowId("ut-ofp:f456")));
 
-        Mockito.when(deviceManager.getIsNotificationFlowRemovedOff()).thenReturn(true);
+        Mockito.when(deviceManager.isFlowRemovedNotificationOn()).thenReturn(true);
 
         deviceContext.setNotificationPublishService(mockedNotificationPublishService);
         deviceContext.processFlowRemovedMessage(flowRemovedBld.build());
 
         Mockito.verify(itemLifecycleListener).onRemoved(flowToBeRemovedPath);
-        Mockito.verify(mockedNotificationPublishService, Mockito.never()).offerNotification(Matchers.any(Notification.class));
 
-        Mockito.when(deviceManager.getIsNotificationFlowRemovedOff()).thenReturn(false);
+        Mockito.when(deviceManager.isFlowRemovedNotificationOn()).thenReturn(false);
         deviceContext.processFlowRemovedMessage(flowRemovedBld.build());
 
         Mockito.verify(mockedNotificationPublishService).offerNotification(Matchers.any(Notification.class));