OPNFLWPLUG-1032: Neon-MRI: Bump odlparent, yangtools, mdsal
[openflowplugin.git] / applications / forwardingrules-sync / src / test / java / org / opendaylight / openflowplugin / applications / frsync / impl / SyncReactorRetryDecoratorTest.java
index 8151e620df889e0ebe4cb74e5e329f64d25ba88f..78ad23040282675362c364a25f864408be7f0920 100644 (file)
@@ -12,7 +12,7 @@ import com.google.common.util.concurrent.Futures;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -27,7 +27,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.N
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
 /**
- * Test for {@link SyncReactorRetryDecorator}
+ * Test for {@link SyncReactorRetryDecorator}.
  */
 @RunWith(MockitoJUnitRunner.class)
 public class SyncReactorRetryDecoratorTest {
@@ -46,14 +46,15 @@ public class SyncReactorRetryDecoratorTest {
     @Before
     public void setUp() {
         reactor = new SyncReactorRetryDecorator(delegate, reconciliationRegistry);
-        InstanceIdentifier<Node> nodePath = InstanceIdentifier.create(Nodes.class).child(Node.class, new NodeKey(NODE_ID));
+        InstanceIdentifier<Node> nodePath = InstanceIdentifier.create(Nodes.class)
+                .child(Node.class, new NodeKey(NODE_ID));
         fcNodePath = nodePath.augmentation(FlowCapableNode.class);
     }
 
     @Test
-    public void testSyncupSuccess() throws InterruptedException {
-        Mockito.when(delegate.syncup(Matchers.<InstanceIdentifier<FlowCapableNode>>any(), Matchers.<SyncupEntry>any()))
-                .thenReturn(Futures.immediateFuture(Boolean.TRUE));
+    public void testSyncupSuccess() {
+        Mockito.when(delegate.syncup(ArgumentMatchers.<InstanceIdentifier<FlowCapableNode>>any(),
+                ArgumentMatchers.<SyncupEntry>any())).thenReturn(Futures.immediateFuture(Boolean.TRUE));
 
         reactor.syncup(fcNodePath, syncupEntry);
 
@@ -63,9 +64,9 @@ public class SyncReactorRetryDecoratorTest {
     }
 
     @Test
-    public void testSyncupFail() throws InterruptedException {
-        Mockito.when(delegate.syncup(Matchers.<InstanceIdentifier<FlowCapableNode>>any(), Matchers.<SyncupEntry>any()))
-                .thenReturn(Futures.immediateFuture(Boolean.FALSE));
+    public void testSyncupFail() {
+        Mockito.when(delegate.syncup(ArgumentMatchers.<InstanceIdentifier<FlowCapableNode>>any(),
+                ArgumentMatchers.<SyncupEntry>any())).thenReturn(Futures.immediateFuture(Boolean.FALSE));
 
         reactor.syncup(fcNodePath, syncupEntry);
 
@@ -75,7 +76,7 @@ public class SyncReactorRetryDecoratorTest {
     }
 
     @Test
-    public void testSyncupConfigIgnoreInRetry() throws InterruptedException {
+    public void testSyncupConfigIgnoreInRetry() {
         Mockito.when(reconciliationRegistry.isRegistered(NODE_ID)).thenReturn(true);
         Mockito.when(syncupEntry.isOptimizedConfigDelta()).thenReturn(true);
 
@@ -84,4 +85,4 @@ public class SyncReactorRetryDecoratorTest {
         Mockito.verifyZeroInteractions(delegate);
     }
 
-}
\ No newline at end of file
+}