OPNFLWPLUG-1032: Neon-MRI: Bump odlparent, yangtools, mdsal
[openflowplugin.git] / openflowplugin-impl / src / test / java / org / opendaylight / openflowplugin / impl / services / sal / SalFlowsBatchServiceImplTest.java
index 6e2941af38ec8110e2f725a6202c495210e83137..e5f9b77e5c70b01eb3dfa85f562f9d62d4fb6573 100644 (file)
@@ -17,9 +17,9 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.ArgumentCaptor;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Captor;
 import org.mockito.InOrder;
-import org.mockito.Matchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -99,7 +99,7 @@ public class SalFlowsBatchServiceImplTest {
     public void setUp() throws Exception {
         salFlowsBatchService = new SalFlowsBatchServiceImpl(salFlowService, transactionService);
 
-        Mockito.when(transactionService.sendBarrier(Matchers.<SendBarrierInput>any()))
+        Mockito.when(transactionService.sendBarrier(ArgumentMatchers.<SendBarrierInput>any()))
                 .thenReturn(RpcResultBuilder.<SendBarrierOutput>success().buildFuture());
     }
 
@@ -110,7 +110,7 @@ public class SalFlowsBatchServiceImplTest {
 
     @Test
     public void testRemoveFlowsBatch_success() throws Exception {
-        Mockito.when(salFlowService.removeFlow(Matchers.<RemoveFlowInput>any()))
+        Mockito.when(salFlowService.removeFlow(ArgumentMatchers.<RemoveFlowInput>any()))
                 .thenReturn(RpcResultBuilder.success(new RemoveFlowOutputBuilder().build())
                         .buildFuture());
 
@@ -141,12 +141,12 @@ public class SalFlowsBatchServiceImplTest {
         Assert.assertEquals(42, allValues.get(0).getPriority().longValue());
         Assert.assertEquals(43, allValues.get(1).getPriority().longValue());
 
-        inOrder.verify(transactionService).sendBarrier(Matchers.<SendBarrierInput>any());
+        inOrder.verify(transactionService).sendBarrier(ArgumentMatchers.<SendBarrierInput>any());
     }
 
     @Test
     public void testRemoveFlowsBatch_failed() throws Exception {
-        Mockito.when(salFlowService.removeFlow(Matchers.<RemoveFlowInput>any()))
+        Mockito.when(salFlowService.removeFlow(ArgumentMatchers.<RemoveFlowInput>any()))
                 .thenReturn(RpcResultBuilder.<RemoveFlowOutput>failed()
                         .withError(RpcError.ErrorType.APPLICATION, "flow-remove-fail-1")
                         .buildFuture());
@@ -178,7 +178,7 @@ public class SalFlowsBatchServiceImplTest {
         Assert.assertEquals(42, allValues.get(0).getPriority().longValue());
         Assert.assertEquals(43, allValues.get(1).getPriority().longValue());
 
-        inOrder.verify(transactionService).sendBarrier(Matchers.<SendBarrierInput>any());
+        inOrder.verify(transactionService).sendBarrier(ArgumentMatchers.<SendBarrierInput>any());
     }
 
     private static BatchAddFlows createEmptyBatchAddFlow(final String flowIdValue, final int priority) {
@@ -211,7 +211,7 @@ public class SalFlowsBatchServiceImplTest {
 
     @Test
     public void testAddFlowsBatch_success() throws Exception {
-        Mockito.when(salFlowService.addFlow(Matchers.<AddFlowInput>any()))
+        Mockito.when(salFlowService.addFlow(ArgumentMatchers.<AddFlowInput>any()))
                 .thenReturn(RpcResultBuilder.success(new AddFlowOutputBuilder().build()).buildFuture());
 
         final AddFlowsBatchInput input = new AddFlowsBatchInputBuilder()
@@ -235,12 +235,12 @@ public class SalFlowsBatchServiceImplTest {
         Assert.assertEquals(42, allValues.get(0).getPriority().longValue());
         Assert.assertEquals(43, allValues.get(1).getPriority().longValue());
 
-        inOrder.verify(transactionService).sendBarrier(Matchers.<SendBarrierInput>any());
+        inOrder.verify(transactionService).sendBarrier(ArgumentMatchers.<SendBarrierInput>any());
     }
 
     @Test
     public void testAddFlowsBatch_failed() throws Exception {
-        Mockito.when(salFlowService.addFlow(Matchers.<AddFlowInput>any()))
+        Mockito.when(salFlowService.addFlow(ArgumentMatchers.<AddFlowInput>any()))
                 .thenReturn(RpcResultBuilder
                         .<AddFlowOutput>failed().withError(RpcError.ErrorType.APPLICATION, "ut-groupAddError")
                         .buildFuture());
@@ -272,12 +272,12 @@ public class SalFlowsBatchServiceImplTest {
         Assert.assertEquals(42, allValues.get(0).getPriority().longValue());
         Assert.assertEquals(43, allValues.get(1).getPriority().longValue());
 
-        inOrder.verify(transactionService).sendBarrier(Matchers.<SendBarrierInput>any());
+        inOrder.verify(transactionService).sendBarrier(ArgumentMatchers.<SendBarrierInput>any());
     }
 
     @Test
     public void testUpdateFlowsBatch_success() throws Exception {
-        Mockito.when(salFlowService.updateFlow(Matchers.<UpdateFlowInput>any()))
+        Mockito.when(salFlowService.updateFlow(ArgumentMatchers.<UpdateFlowInput>any()))
                 .thenReturn(RpcResultBuilder.success(new UpdateFlowOutputBuilder().build()).buildFuture());
 
         final UpdateFlowsBatchInput input = new UpdateFlowsBatchInputBuilder()
@@ -303,12 +303,12 @@ public class SalFlowsBatchServiceImplTest {
         Assert.assertEquals(44, allValues.get(1).getOriginalFlow().getPriority().longValue());
         Assert.assertEquals(45, allValues.get(1).getUpdatedFlow().getPriority().longValue());
 
-        inOrder.verify(transactionService).sendBarrier(Matchers.<SendBarrierInput>any());
+        inOrder.verify(transactionService).sendBarrier(ArgumentMatchers.<SendBarrierInput>any());
     }
 
     @Test
     public void testUpdateFlowsBatch_failure() throws Exception {
-        Mockito.when(salFlowService.updateFlow(Matchers.<UpdateFlowInput>any()))
+        Mockito.when(salFlowService.updateFlow(ArgumentMatchers.<UpdateFlowInput>any()))
                 .thenReturn(RpcResultBuilder.<UpdateFlowOutput>failed()
                         .withError(RpcError.ErrorType.APPLICATION, "ut-flowUpdateError")
                         .buildFuture());
@@ -342,6 +342,6 @@ public class SalFlowsBatchServiceImplTest {
         Assert.assertEquals(44, allValues.get(1).getOriginalFlow().getPriority().longValue());
         Assert.assertEquals(45, allValues.get(1).getUpdatedFlow().getPriority().longValue());
 
-        inOrder.verify(transactionService).sendBarrier(Matchers.<SendBarrierInput>any());
+        inOrder.verify(transactionService).sendBarrier(ArgumentMatchers.<SendBarrierInput>any());
     }
 }