Remove unused routedRpcRegistration
[openflowplugin.git] / openflowplugin-impl / src / test / java / org / opendaylight / openflowplugin / impl / statistics / services / OpendaylightFlowStatisticsServiceImpl3Test.java
index 897c872a98d524e6dba4048fc22dfbad57e2179d..3ee63b8acc14e757a3f5bc7f5a95d0c0c7c88bd4 100644 (file)
@@ -11,6 +11,8 @@ package org.opendaylight.openflowplugin.impl.statistics.services;
 import org.junit.Test;
 import org.mockito.Mock;
 import org.mockito.Mockito;
+import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.ConvertorManager;
+import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.ConvertorManagerFactory;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.GetAggregateFlowStatisticsFromFlowTableForAllFlowsInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.GetAggregateFlowStatisticsFromFlowTableForAllFlowsInputBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.GetAllFlowStatisticsFromFlowTableInput;
@@ -21,9 +23,11 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.G
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.GetFlowStatisticsFromFlowTableInputBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.OpendaylightFlowStatisticsService;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.TableId;
+import org.opendaylight.yangtools.yang.common.Uint16;
+import org.opendaylight.yangtools.yang.common.Uint8;
 
 /**
- * Test for {@link OpendaylightFlowStatisticsServiceImpl} - only delegated methods
+ * Test for {@link OpendaylightFlowStatisticsServiceImpl} - only delegated methods.
  */
 public class OpendaylightFlowStatisticsServiceImpl3Test extends AbstractStatsServiceTest {
 
@@ -32,16 +36,20 @@ public class OpendaylightFlowStatisticsServiceImpl3Test extends AbstractStatsSer
 
     private OpendaylightFlowStatisticsServiceImpl flowStatisticsService;
 
+    @Override
     public void setUp() {
-        flowStatisticsService = new OpendaylightFlowStatisticsServiceImpl(rqContextStack, deviceContext);
+        final ConvertorManager convertorManager = ConvertorManagerFactory.createDefaultManager();
+        flowStatisticsService =
+                OpendaylightFlowStatisticsServiceImpl.createWithOook(rqContextStack, deviceContext, convertorManager);
         flowStatisticsService.setDelegate(flowStatisticsDelegate);
     }
 
     @Test
-    public void testGetAggregateFlowStatisticsFromFlowTableForAllFlows() throws Exception {
-        GetAggregateFlowStatisticsFromFlowTableForAllFlowsInput input = new GetAggregateFlowStatisticsFromFlowTableForAllFlowsInputBuilder()
+    public void testGetAggregateFlowStatisticsFromFlowTableForAllFlows() {
+        GetAggregateFlowStatisticsFromFlowTableForAllFlowsInput input =
+                new GetAggregateFlowStatisticsFromFlowTableForAllFlowsInputBuilder()
                 .setNode(createNodeRef("unitProt:123"))
-                .setTableId(new TableId((short) 1))
+                .setTableId(new TableId(Uint8.ONE))
                 .build();
 
         flowStatisticsService.getAggregateFlowStatisticsFromFlowTableForAllFlows(input);
@@ -49,10 +57,10 @@ public class OpendaylightFlowStatisticsServiceImpl3Test extends AbstractStatsSer
     }
 
     @Test
-    public void testGetAllFlowStatisticsFromFlowTable() throws Exception {
+    public void testGetAllFlowStatisticsFromFlowTable() {
         GetAllFlowStatisticsFromFlowTableInput input = new GetAllFlowStatisticsFromFlowTableInputBuilder()
                 .setNode(createNodeRef("unitProt:123"))
-                .setTableId(new TableId((short) 1))
+                .setTableId(new TableId(Uint8.ONE))
                 .build();
 
         flowStatisticsService.getAllFlowStatisticsFromFlowTable(input);
@@ -60,7 +68,7 @@ public class OpendaylightFlowStatisticsServiceImpl3Test extends AbstractStatsSer
     }
 
     @Test
-    public void testGetAllFlowsStatisticsFromAllFlowTables() throws Exception {
+    public void testGetAllFlowsStatisticsFromAllFlowTables() {
         GetAllFlowsStatisticsFromAllFlowTablesInput input = new GetAllFlowsStatisticsFromAllFlowTablesInputBuilder()
                 .setNode(createNodeRef("unitProt:123"))
                 .build();
@@ -70,10 +78,10 @@ public class OpendaylightFlowStatisticsServiceImpl3Test extends AbstractStatsSer
     }
 
     @Test
-    public void testGetFlowStatisticsFromFlowTable() throws Exception {
+    public void testGetFlowStatisticsFromFlowTable() {
         GetFlowStatisticsFromFlowTableInput input = new GetFlowStatisticsFromFlowTableInputBuilder()
                 .setNode(createNodeRef("unitProt:123"))
-                .setPriority(5)
+                .setPriority(Uint16.valueOf(5))
                 .build();
 
         flowStatisticsService.getFlowStatisticsFromFlowTable(input);