Switch to MD-SAL APIs
[openflowplugin.git] / openflowplugin-impl / src / test / java / org / opendaylight / openflowplugin / impl / statistics / services / direct / singlelayer / MeterDirectStatisticsServiceTest.java
index 64672443786f01e465bed2177be78b879f19f204..cb9d144aae2fa524f1e2ff669a23b2ec3302fce2 100644 (file)
@@ -5,22 +5,21 @@
  * 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.direct.singlelayer;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.eq;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.lenient;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
 import java.math.BigInteger;
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
-import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
+import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.openflowplugin.api.openflow.device.Xid;
 import org.opendaylight.openflowplugin.impl.statistics.services.direct.AbstractDirectStatisticsServiceTest;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Counter32;
@@ -55,7 +54,7 @@ public class MeterDirectStatisticsServiceTest extends AbstractDirectStatisticsSe
     public void testBuildRequestBody() throws Exception {
         final GetMeterStatisticsInput input = mock(GetMeterStatisticsInput.class);
 
-        when(input.getNode()).thenReturn(createNodeRef(NODE_ID));
+        lenient().when(input.getNode()).thenReturn(createNodeRef(NODE_ID));
         when(input.getMeterId()).thenReturn(new MeterId(METER_NO));
 
         final MultipartRequestMeterStats body = (MultipartRequestMeterStats) ((MultipartRequest) service
@@ -103,7 +102,8 @@ public class MeterDirectStatisticsServiceTest extends AbstractDirectStatisticsSe
         when(stat.getMeterId()).thenReturn(new MeterId(METER_NO));
 
         final List<org.opendaylight.yang.gen.v1.urn
-                .opendaylight.meter.types.rev130918.meter.statistics.reply.MeterStats> stats = Arrays.asList(stat);
+                .opendaylight.meter.types.rev130918.meter.statistics.reply.MeterStats>
+                stats = Collections.singletonList(stat);
         final GetMeterStatisticsOutput output = mock(GetMeterStatisticsOutput.class);
         when(output.getMeterStats()).thenReturn(stats);