X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=openflowplugin-impl%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fopenflowplugin%2Fimpl%2Fstatistics%2Fservices%2Fcompatibility%2FOpendaylightFlowStatisticsServiceDelegateImplTest.java;h=aa8bf5526daf09e992e62521c16ef4e3504be994;hb=b4f4b4b702e2ccd8a7c62fd2a5c184c5b1cbe665;hp=c26b9d060c06eaa54e5a0fc03356a660317d34c3;hpb=2373479fdc5a59f1399e50f5de1dc321d429d76b;p=openflowplugin.git diff --git a/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/compatibility/OpendaylightFlowStatisticsServiceDelegateImplTest.java b/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/compatibility/OpendaylightFlowStatisticsServiceDelegateImplTest.java index c26b9d060c..aa8bf5526d 100644 --- a/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/compatibility/OpendaylightFlowStatisticsServiceDelegateImplTest.java +++ b/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/compatibility/OpendaylightFlowStatisticsServiceDelegateImplTest.java @@ -8,6 +8,9 @@ package org.opendaylight.openflowplugin.impl.statistics.services.compatibility; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.eq; + import com.google.common.util.concurrent.FutureCallback; import java.math.BigInteger; import java.util.Collections; @@ -16,8 +19,8 @@ import java.util.concurrent.atomic.AtomicLong; import org.junit.Assert; import org.junit.Test; import org.mockito.ArgumentCaptor; +import org.mockito.ArgumentMatchers; import org.mockito.Captor; -import org.mockito.Matchers; import org.mockito.Mock; import org.mockito.Mockito; import org.opendaylight.openflowplugin.api.OFConstants; @@ -83,8 +86,8 @@ public class OpendaylightFlowStatisticsServiceDelegateImplTest extends AbstractS rqContextStack, deviceContext, notificationPublishService, new AtomicLong(21), convertorManager); Mockito.doAnswer(answerVoidToCallback).when(outboundQueueProvider) - .commitEntry(Matchers.eq(42L), requestInput.capture(), Matchers.any(FutureCallback.class)); - Mockito.when(translatorLibrary.lookupTranslator(Matchers.any())).thenReturn(translator); + .commitEntry(eq(42L), requestInput.capture(), any(FutureCallback.class)); + Mockito.when(translatorLibrary.lookupTranslator(ArgumentMatchers.any())).thenReturn(translator); } @Test(expected = IllegalAccessError.class) @@ -99,7 +102,7 @@ public class OpendaylightFlowStatisticsServiceDelegateImplTest extends AbstractS .setNode(createNodeRef("unitProt:123")) .setTableId(new TableId((short) 1)); - Mockito.when(translator.translate(Matchers.any(MultipartReply.class), Matchers.eq(deviceInfo), Matchers.any())) + Mockito.when(translator.translate(any(MultipartReply.class), eq(deviceInfo),any())) .thenReturn(new AggregatedFlowStatisticsBuilder() .setByteCount(new Counter64(BigInteger.valueOf(50L))) .setPacketCount(new Counter64(BigInteger.valueOf(51L))) @@ -130,7 +133,7 @@ public class OpendaylightFlowStatisticsServiceDelegateImplTest extends AbstractS Assert.assertEquals(MultipartType.OFPMPAGGREGATE, requestInput.getValue().getType()); Mockito.verify(notificationPublishService, Mockito.timeout(NOTIFICATION_WAIT_TIMEOUT_MS)) - .offerNotification(Matchers.any(Notification.class)); + .offerNotification(any(Notification.class)); } @Test @@ -150,7 +153,7 @@ public class OpendaylightFlowStatisticsServiceDelegateImplTest extends AbstractS Assert.assertEquals(MultipartType.OFPMPFLOW, requestInput.getValue().getType()); Mockito.verify(notificationPublishService, Mockito.timeout(NOTIFICATION_WAIT_TIMEOUT_MS)) - .offerNotification(Matchers.any(Notification.class)); + .offerNotification(any(Notification.class)); } private static RpcResult buildFlowStatsReply() { @@ -213,7 +216,7 @@ public class OpendaylightFlowStatisticsServiceDelegateImplTest extends AbstractS Assert.assertEquals(MultipartType.OFPMPFLOW, requestInput.getValue().getType()); Mockito.verify(notificationPublishService, Mockito.timeout(NOTIFICATION_WAIT_TIMEOUT_MS)) - .offerNotification(Matchers.any(Notification.class)); + .offerNotification(any(Notification.class)); } @Test @@ -235,6 +238,6 @@ public class OpendaylightFlowStatisticsServiceDelegateImplTest extends AbstractS Assert.assertEquals(MultipartType.OFPMPFLOW, requestInput.getValue().getType()); Mockito.verify(notificationPublishService, Mockito.timeout(NOTIFICATION_WAIT_TIMEOUT_MS)) - .offerNotification(Matchers.any(Notification.class)); + .offerNotification(any(Notification.class)); } }