Merge "Close transaction so we don't leak them."
[netvirt.git] / openstack / net-virt / src / test / java / org / opendaylight / ovsdb / openstack / netvirt / FloatingIPHandlerTest.java
index 89eaaa0adef8e22541cb02b5634722de83584ecf..ddc298c1c975323b2202c6e1c01b29913596ce2f 100644 (file)
@@ -55,18 +55,17 @@ public class FloatingIPHandlerTest {
         NorthboundEvent ev = mock(NorthboundEvent.class);
 
         when(ev.getNeutronFloatingIP()).thenReturn(mock(NeutronFloatingIP.class));
-        when(ev.getAction()).thenReturn(Action.UPDATE);
-
-        verifyNoMoreInteractions(neutronL3Adapter);
 
+        when(ev.getAction()).thenReturn(Action.UPDATE);
         floatingHandler.processEvent((AbstractEvent) ev);
-
         verify(neutronL3Adapter, times(1)).handleNeutronFloatingIPEvent(ev.getNeutronFloatingIP(), ev.getAction());;
 
         when(ev.getAction()).thenReturn(Action.ADD);
-        verify(neutronL3Adapter, times(0)).handleNeutronFloatingIPEvent(ev.getNeutronFloatingIP(), ev.getAction());;
+        floatingHandler.processEvent((AbstractEvent) ev);
+        verify(neutronL3Adapter, times(1)).handleNeutronFloatingIPEvent(ev.getNeutronFloatingIP(), ev.getAction());;
 
         when(ev.getAction()).thenReturn(Action.DELETE);
-        verify(neutronL3Adapter, times(0)).handleNeutronFloatingIPEvent(ev.getNeutronFloatingIP(), ev.getAction());;
+        floatingHandler.processEvent((AbstractEvent) ev);
+        verify(neutronL3Adapter, times(1)).handleNeutronFloatingIPEvent(ev.getNeutronFloatingIP(), ev.getAction());;
     }
 }