Merge "OPNFLWPLUG-1076 Migrate lldp-speaker, forwardingrules-sync and arbitratorrecon...
[openflowplugin.git] / openflowplugin-impl / src / test / java / org / opendaylight / openflowplugin / impl / statistics / services / direct / singlelayer / QueueDirectStatisticsServiceTest.java
index f53dd84dd0d54a5ff5c50c9a1057ab437bb4089e..bb50e72972727e04b1d31025d8199acfa9bdb609 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.services.direct.singlelayer;
 
 import static org.junit.Assert.assertEquals;
@@ -21,7 +20,7 @@ import java.math.BigInteger;
 import java.util.Collections;
 import java.util.List;
 import org.junit.Test;
-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.Counter64;
@@ -37,13 +36,14 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.
 import org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.multipart.request.multipart.request.body.MultipartRequestQueueStats;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.queue.id.and.statistics.map.QueueIdAndStatisticsMap;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.queue.id.and.statistics.map.QueueIdAndStatisticsMapBuilder;
+import org.opendaylight.yangtools.yang.common.Uint32;
 
 public class QueueDirectStatisticsServiceTest extends AbstractDirectStatisticsServiceTest {
-    static final Long QUEUE_NO = 1L;
+    static final Uint32 QUEUE_NO = Uint32.ONE;
     private QueueDirectStatisticsService service;
 
     @Override
-    public void setUp() throws Exception {
+    public void setUp() {
         service = new QueueDirectStatisticsService(requestContextStack,
                                                    deviceContext,
                                                    convertorManager,
@@ -51,7 +51,7 @@ public class QueueDirectStatisticsServiceTest extends AbstractDirectStatisticsSe
     }
 
     @Override
-    public void testBuildRequestBody() throws Exception {
+    public void testBuildRequestBody() {
         final GetQueueStatisticsInput input = mock(GetQueueStatisticsInput.class);
 
         lenient().when(input.getNode()).thenReturn(createNodeRef(NODE_ID));
@@ -59,7 +59,7 @@ public class QueueDirectStatisticsServiceTest extends AbstractDirectStatisticsSe
         when(input.getNodeConnectorId()).thenReturn(nodeConnectorId);
 
         final MultipartRequestQueueStats body = (MultipartRequestQueueStats) ((MultipartRequest) service
-            .buildRequest(new Xid(42L), input))
+            .buildRequest(new Xid(Uint32.valueOf(42L)), input))
             .getMultipartRequestBody();
 
         assertEquals(nodeConnectorId, body.getNodeConnectorId());
@@ -67,7 +67,7 @@ public class QueueDirectStatisticsServiceTest extends AbstractDirectStatisticsSe
     }
 
     @Override
-    public void testBuildReply() throws Exception {
+    public void testBuildReply() {
         final QueueIdAndStatisticsMap queueStats = new QueueIdAndStatisticsMapBuilder()
                 .setQueueId(new QueueId(QUEUE_NO))
                 .setNodeConnectorId(new NodeConnectorId(PORT_NO.toString()))
@@ -92,7 +92,7 @@ public class QueueDirectStatisticsServiceTest extends AbstractDirectStatisticsSe
     }
 
     @Test
-    public void testStoreStatisticsBarePortNo() throws Exception {
+    public void testStoreStatisticsBarePortNo() {
         final QueueIdAndStatisticsMap map = mock(QueueIdAndStatisticsMap.class);
         when(map.getQueueId()).thenReturn(new QueueId(QUEUE_NO));
         when(map.getNodeConnectorId()).thenReturn(new NodeConnectorId("1"));
@@ -106,7 +106,7 @@ public class QueueDirectStatisticsServiceTest extends AbstractDirectStatisticsSe
     }
 
     @Override
-    public void testStoreStatistics() throws Exception {
+    public void testStoreStatistics() {
         final QueueIdAndStatisticsMap map = mock(QueueIdAndStatisticsMap.class);
         when(map.getQueueId()).thenReturn(new QueueId(QUEUE_NO));
         when(map.getNodeConnectorId()).thenReturn(new NodeConnectorId("openflow:1:1"));