X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=openflowplugin-impl%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fopenflowplugin%2Fimpl%2Fstatistics%2Fservices%2FOpendaylightGroupStatisticsServiceImplTest.java;h=c0a013b59b2d384ad1837ec15e81461ae6b94a2d;hb=b4f4b4b702e2ccd8a7c62fd2a5c184c5b1cbe665;hp=84e5b4e2d37fadafb6cb25d8c9e1043f8de693a1;hpb=9b739fdca6ca96aa84bb12e8eb51381422aa38c6;p=openflowplugin.git diff --git a/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/OpendaylightGroupStatisticsServiceImplTest.java b/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/OpendaylightGroupStatisticsServiceImplTest.java index 84e5b4e2d3..c0a013b59b 100644 --- a/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/OpendaylightGroupStatisticsServiceImplTest.java +++ b/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/OpendaylightGroupStatisticsServiceImplTest.java @@ -8,6 +8,9 @@ package org.opendaylight.openflowplugin.impl.statistics.services; +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; @@ -17,10 +20,12 @@ import org.junit.After; 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.Mockito; import org.opendaylight.openflowplugin.api.OFConstants; +import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.ConvertorManager; +import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.ConvertorManagerFactory; import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GetAllGroupStatisticsInputBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GetAllGroupStatisticsOutput; import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GetGroupDescriptionInputBuilder; @@ -53,11 +58,12 @@ import org.opendaylight.yangtools.yang.common.RpcResult; import org.opendaylight.yangtools.yang.common.RpcResultBuilder; /** - * Test for {@link OpendaylightGroupStatisticsServiceImpl} + * Test for {@link OpendaylightGroupStatisticsServiceImpl}. */ public class OpendaylightGroupStatisticsServiceImplTest extends AbstractSingleStatsServiceTest { - private static final org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.GroupId GROUP_ID = + private static final org.opendaylight.yang.gen.v1.urn + .opendaylight.openflow.common.types.rev130731.GroupId GROUP_ID = new org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.GroupId(123L); @Captor private ArgumentCaptor requestInput; @@ -65,16 +71,17 @@ public class OpendaylightGroupStatisticsServiceImplTest extends AbstractSingleSt private OpendaylightGroupStatisticsServiceImpl groupStatisticsService; public void setUp() { + final ConvertorManager convertorManager = ConvertorManagerFactory.createDefaultManager(); groupStatisticsService = new OpendaylightGroupStatisticsServiceImpl(rqContextStack, deviceContext, - new AtomicLong(), notificationPublishService); + new AtomicLong(), notificationPublishService, convertorManager); Mockito.doAnswer(answerVoidToCallback).when(outboundQueueProvider) - .commitEntry(Matchers.eq(42L), requestInput.capture(), Matchers.any(FutureCallback.class)); + .commitEntry(eq(42L), requestInput.capture(), any(FutureCallback.class)); } @After public void tearDown() throws Exception { - Mockito.verify(notificationPublishService).offerNotification(Matchers.any()); + Mockito.verify(notificationPublishService).offerNotification(ArgumentMatchers.any()); } @Test