X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=openflowplugin-impl%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fopenflowplugin%2Fimpl%2Fstatistics%2Fservices%2FAbstractSingleStatsServiceTest.java;h=e1dd5f3ac315edfd48189ecd5ce03198abc367d2;hb=cfe3a97837951ebbedb337dc988027f10c49f714;hp=7cb1ab1a15558224b233eb514c93b9c0e8c27a1e;hpb=4bc0c112b74a7ec57851aa662b7e9c4a67bb6879;p=openflowplugin.git diff --git a/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/AbstractSingleStatsServiceTest.java b/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/AbstractSingleStatsServiceTest.java index 7cb1ab1a15..e1dd5f3ac3 100644 --- a/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/AbstractSingleStatsServiceTest.java +++ b/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/AbstractSingleStatsServiceTest.java @@ -5,23 +5,16 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ - package org.opendaylight.openflowplugin.impl.statistics.services; -import org.mockito.Matchers; import org.mockito.Mock; import org.mockito.Mockito; -import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; -import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; +import org.opendaylight.mdsal.binding.api.NotificationPublishService; import org.opendaylight.openflowplugin.api.openflow.device.RequestContext; -import org.opendaylight.openflowplugin.api.openflow.statistics.ofpspecific.EventIdentifier; import org.opendaylight.openflowplugin.impl.rpc.AbstractRequestContext; import org.opendaylight.yangtools.yang.common.RpcResult; -/** - * Created by mirehak on 9/9/15. - */ public abstract class AbstractSingleStatsServiceTest extends AbstractStatsServiceTest { @Mock @@ -40,17 +33,13 @@ public abstract class AbstractSingleStatsServiceTest extends AbstractStatsServic //NOOP } }; - final Answer closeRequestFutureAnswer = new Answer() { - @Override - public Void answer(InvocationOnMock invocation) throws Throwable { - rqContext.setResult(rpcResult); - rqContext.close(); - return null; - } + final Answer closeRequestFutureAnswer = invocation -> { + rqContext.setResult(rpcResult); + rqContext.close(); + return null; }; Mockito.when(rqContextStack.createRequestContext()).thenReturn(rqContext); Mockito.doAnswer(closeRequestFutureAnswer).when(multiMsgCollector).endCollecting(null); - Mockito.doAnswer(closeRequestFutureAnswer).when(multiMsgCollector).endCollecting(Matchers.any(EventIdentifier.class)); } }