Switch to MD-SAL APIs
[openflowplugin.git] / openflowplugin-impl / src / test / java / org / opendaylight / openflowplugin / impl / statistics / services / AbstractSingleStatsServiceTest.java
index 7cb1ab1a15558224b233eb514c93b9c0e8c27a1e..e1dd5f3ac315edfd48189ecd5ce03198abc367d2 100644 (file)
@@ -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.<Object>createRequestContext()).thenReturn(rqContext);
         Mockito.doAnswer(closeRequestFutureAnswer).when(multiMsgCollector).endCollecting(null);
-        Mockito.doAnswer(closeRequestFutureAnswer).when(multiMsgCollector).endCollecting(Matchers.any(EventIdentifier.class));
     }
 }