Modify test case testProcessEvent() for FloatingIPHandlerTest class. 25/17925/1
authorAlexis de Talhouët <adetalhouet@inocybe.com>
Wed, 8 Apr 2015 13:53:52 +0000 (09:53 -0400)
committerAlexis de Talhouët <adetalhouet@inocybe.com>
Wed, 8 Apr 2015 13:53:52 +0000 (09:53 -0400)
Change-Id: I3cea00cabe74a3d893c848a654bc77278a1afdaf
Signed-off-by: Alexis de Talhouët <adetalhouet@inocybe.com>
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());;
     }
 }