Merge "Remove deprecated EOS services"
[openflowplugin.git] / openflowplugin-impl / src / test / java / org / opendaylight / openflowplugin / impl / statistics / services / compatibility / AbstractCompatibleStatServiceTest.java
index 80e5bac38d70683cd5dc5d11d4ac799caf3fc277..8d6092cdc6ea816c7b9edee32b250fcc21bbe67b 100644 (file)
@@ -20,7 +20,6 @@ import org.mockito.Captor;
 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.openflowplugin.api.OFConstants;
@@ -86,13 +85,10 @@ public class AbstractCompatibleStatServiceTest extends AbstractStatsServiceTest
                 //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(featuresOutput.getVersion()).thenReturn(OFConstants.OFP_VERSION_1_3);
@@ -152,8 +148,8 @@ public class AbstractCompatibleStatServiceTest extends AbstractStatsServiceTest
                 service.handleAndNotify(input, notificationPublishService);
 
         Assert.assertTrue(resultFuture.isDone());
-        final RpcResult<GetAggregateFlowStatisticsFromFlowTableForAllFlowsOutput> rpcResult = resultFuture.get();
-        Assert.assertTrue(rpcResult.isSuccessful());
+        final RpcResult<GetAggregateFlowStatisticsFromFlowTableForAllFlowsOutput> result = resultFuture.get();
+        Assert.assertTrue(result.isSuccessful());
         Assert.assertEquals(MultipartType.OFPMPAGGREGATE, requestInput.getValue().getType());
         Mockito.verify(notificationPublishService, Mockito.timeout(500))
                 .offerNotification(Matchers.any(AggregateFlowStatisticsUpdate.class));