Further warning removal
[openflowplugin.git] / openflowplugin-impl / src / test / java / org / opendaylight / openflowplugin / impl / statistics / StatisticsContextImplParamTest.java
index 915dd009383273660d6cf17be0a4ac33bb7577ae..aee1e8c0b2cf7c266ce2119b3b6a8beba39a161d 100644 (file)
@@ -5,7 +5,6 @@
  * 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;
 
 import static com.google.common.util.concurrent.Futures.immediateFuture;
@@ -36,12 +35,13 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflow
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflow.provider.config.rev160510.OpenflowProviderConfig;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
+import org.opendaylight.yangtools.yang.common.Uint32;
 
 @RunWith(Parameterized.class)
 public class StatisticsContextImplParamTest extends StatisticsContextImpMockInitiation {
 
     @Mock
-    private OpenflowProviderConfig config = mock(OpenflowProviderConfig.class);
+    private final OpenflowProviderConfig config = mock(OpenflowProviderConfig.class);
 
     public StatisticsContextImplParamTest(final boolean isTable, final boolean isFlow,
                                           final boolean isGroup, final boolean isMeter,
@@ -69,14 +69,14 @@ public class StatisticsContextImplParamTest extends StatisticsContextImpMockInit
 
     @Before
     public void setUp() {
-        Mockito.when(config.isIsTableStatisticsPollingOn()).thenReturn(true);
-        Mockito.when(config.isIsFlowStatisticsPollingOn()).thenReturn(true);
-        Mockito.when(config.isIsGroupStatisticsPollingOn()).thenReturn(true);
-        Mockito.when(config.isIsMeterStatisticsPollingOn()).thenReturn(true);
-        Mockito.when(config.isIsPortStatisticsPollingOn()).thenReturn(true);
-        Mockito.when(config.isIsQueueStatisticsPollingOn()).thenReturn(true);
-        Mockito.when(config.getBasicTimerDelay()).thenReturn(new NonZeroUint32Type(3000L));
-        Mockito.when(config.getMaximumTimerDelay()).thenReturn(new NonZeroUint32Type(50000L));
+        Mockito.when(config.getIsTableStatisticsPollingOn()).thenReturn(true);
+        Mockito.when(config.getIsFlowStatisticsPollingOn()).thenReturn(true);
+        Mockito.when(config.getIsGroupStatisticsPollingOn()).thenReturn(true);
+        Mockito.when(config.getIsMeterStatisticsPollingOn()).thenReturn(true);
+        Mockito.when(config.getIsPortStatisticsPollingOn()).thenReturn(true);
+        Mockito.when(config.getIsQueueStatisticsPollingOn()).thenReturn(true);
+        Mockito.when(config.getBasicTimerDelay()).thenReturn(new NonZeroUint32Type(Uint32.valueOf(3000)));
+        Mockito.when(config.getMaximumTimerDelay()).thenReturn(new NonZeroUint32Type(Uint32.valueOf(50000)));
     }
 
     @Test
@@ -109,7 +109,7 @@ public class StatisticsContextImplParamTest extends StatisticsContextImpMockInit
         statisticsContext.registerMastershipWatcher(mockedMastershipWatcher);
         statisticsContext.setStatisticsGatheringService(mockedStatisticsGatheringService);
         statisticsContext.setStatisticsGatheringOnTheFlyService(mockedStatisticsOnFlyGatheringService);
-        statisticsContext.instantiateServiceInstance();
+        statisticsContext.initializeDevice();
 
         verify(mockedStatisticsGatheringService, times(7))
                 .getStatisticsOfType(any(EventIdentifier.class), any(MultipartType.class));