Migrate Mockito methods 32/92332/2
authorRobert Varga <robert.varga@pantheon.tech>
Sun, 30 Aug 2020 21:57:19 +0000 (23:57 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Sun, 30 Aug 2020 22:04:22 +0000 (00:04 +0200)
Mockito.verifyZeroInterations() has been deprecated as was
ArgumentMatchers.isNull(Class). Migrate users to their replacements.

Change-Id: If561a9b61bf03f1620ff38b30cb2e01f69021e7f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
applications/forwardingrules-sync/src/test/java/org/opendaylight/openflowplugin/applications/frsync/impl/SimplifiedConfigListenerTest.java
applications/forwardingrules-sync/src/test/java/org/opendaylight/openflowplugin/applications/frsync/impl/SimplifiedOperationalListenerTest.java
applications/forwardingrules-sync/src/test/java/org/opendaylight/openflowplugin/applications/frsync/impl/SyncReactorClusterDecoratorTest.java
applications/forwardingrules-sync/src/test/java/org/opendaylight/openflowplugin/applications/frsync/impl/SyncReactorRetryDecoratorTest.java
applications/forwardingrules-sync/src/test/java/org/opendaylight/openflowplugin/applications/frsync/impl/strategy/SyncPlanPushStrategyIncrementalImplTest.java

index 41b1d08f707d6d38b046cc7dba6f61efae2c2d9c..044d5f05f7f2fd338cf893ec27c58b3f530173b8 100644 (file)
@@ -135,7 +135,7 @@ public class SimplifiedConfigListenerTest {
 
         nodeListenerConfig.onDataTreeChanged(Collections.singleton(dataTreeModification));
 
-        Mockito.verifyZeroInteractions(reactor);
+        Mockito.verifyNoMoreInteractions(reactor);
         Mockito.verify(roTx).close();
     }
 
index 0a4d143af541aadcd3cd36d2f09758a31d4928cb..3502295cfabb3b7d51f28c320497e68b87d11de3 100644 (file)
@@ -123,7 +123,7 @@ public class SimplifiedOperationalListenerTest {
         operationalAdd();
         nodeListenerOperational.onDataTreeChanged(Collections.singleton(dataTreeModification));
         Mockito.verify(deviceMastershipManager).onDeviceConnected(NODE_ID);
-        Mockito.verifyZeroInteractions(reactor);
+        Mockito.verifyNoMoreInteractions(reactor);
     }
 
     @Test
@@ -134,7 +134,7 @@ public class SimplifiedOperationalListenerTest {
         nodeListenerOperational.onDataTreeChanged(Collections.singleton(dataTreeModification));
 
         Mockito.verify(deviceMastershipManager).onDeviceDisconnected(NODE_ID);
-        Mockito.verifyZeroInteractions(reactor);
+        Mockito.verifyNoMoreInteractions(reactor);
     }
 
     @Test
@@ -148,7 +148,7 @@ public class SimplifiedOperationalListenerTest {
         nodeListenerOperational.onDataTreeChanged(Collections.singleton(dataTreeModification));
 
         Mockito.verify(deviceMastershipManager).onDeviceDisconnected(NODE_ID);
-        Mockito.verifyZeroInteractions(reactor);
+        Mockito.verifyNoMoreInteractions(reactor);
     }
 
     @Test
@@ -158,7 +158,7 @@ public class SimplifiedOperationalListenerTest {
 
         nodeListenerOperational.onDataTreeChanged(Collections.singleton(dataTreeModification));
 
-        Mockito.verifyZeroInteractions(reactor);
+        Mockito.verifyNoMoreInteractions(reactor);
     }
 
     @Test
@@ -169,7 +169,7 @@ public class SimplifiedOperationalListenerTest {
 
         nodeListenerOperational.onDataTreeChanged(Collections.singleton(dataTreeModification));
 
-        Mockito.verifyZeroInteractions(reactor);
+        Mockito.verifyNoMoreInteractions(reactor);
     }
 
     @Test
@@ -182,7 +182,7 @@ public class SimplifiedOperationalListenerTest {
 
         nodeListenerOperational.onDataTreeChanged(Collections.singleton(dataTreeModification));
 
-        Mockito.verifyZeroInteractions(reactor);
+        Mockito.verifyNoMoreInteractions(reactor);
     }
 
     @Test
@@ -196,7 +196,7 @@ public class SimplifiedOperationalListenerTest {
 
         nodeListenerOperational.onDataTreeChanged(Collections.singleton(dataTreeModification));
 
-        Mockito.verifyZeroInteractions(reactor);
+        Mockito.verifyNoMoreInteractions(reactor);
     }
 
     @Test
@@ -207,7 +207,7 @@ public class SimplifiedOperationalListenerTest {
 
         nodeListenerOperational.onDataTreeChanged(Collections.singleton(dataTreeModification));
 
-        Mockito.verifyZeroInteractions(reactor);
+        Mockito.verifyNoMoreInteractions(reactor);
     }
 
     @Test
@@ -252,7 +252,7 @@ public class SimplifiedOperationalListenerTest {
         nodeListenerOperational.onDataTreeChanged(Collections.singleton(dataTreeModification));
 
         Mockito.verify(reconciliationRegistry).unregisterIfRegistered(NODE_ID);
-        Mockito.verifyZeroInteractions(reactor);
+        Mockito.verifyNoMoreInteractions(reactor);
         Mockito.verify(roTx).close();
     }
 
index 6f9efb44a06f593fcd472681c70df4b650c9a67b..afe77e93b3d0bf990ac95dfb43ce8f3758b23f8b 100644 (file)
@@ -65,7 +65,7 @@ public class SyncReactorClusterDecoratorTest {
 
         reactor.syncup(fcNodePath, syncupEntry);
 
-        Mockito.verifyZeroInteractions(delegate);
+        Mockito.verifyNoMoreInteractions(delegate);
     }
 
 }
index d82753c0d7a80f6068ea6a8a4ca5a647f35586c2..e9cbb042a0094e67f93ba0317cd70593622e5954 100644 (file)
@@ -82,7 +82,7 @@ public class SyncReactorRetryDecoratorTest {
 
         reactor.syncup(fcNodePath, syncupEntry);
 
-        Mockito.verifyZeroInteractions(delegate);
+        Mockito.verifyNoMoreInteractions(delegate);
     }
 
 }
index da0296e2e7bfefb7fafc518cd564aaa3653eca43..b194454f7da5d183e0ce981a759f09660504ace2 100644 (file)
@@ -611,9 +611,8 @@ public class SyncPlanPushStrategyIncrementalImplTest {
 
     @Test
     public void testUpdateTableFeatures() throws Exception {
-        Mockito.lenient().when(tableCommitter.update(ArgumentMatchers.any(),
-                ArgumentMatchers.isNull(TableFeatures.class), tableFeaturesCaptor.capture(),
-                ArgumentMatchers.same(NODE_IDENT)))
+        Mockito.lenient().when(tableCommitter.update(ArgumentMatchers.any(), ArgumentMatchers.isNull(),
+                tableFeaturesCaptor.capture(), ArgumentMatchers.same(NODE_IDENT)))
                 .thenReturn(RpcResultBuilder.success(new UpdateTableOutputBuilder().build()).buildFuture());
 
         final FlowCapableNode operational = new FlowCapableNodeBuilder()