X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=openflowplugin-impl%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fopenflowplugin%2Fimpl%2Fstatistics%2Fservices%2Fdedicated%2FStatisticsGatheringOnTheFlyServiceTest.java;h=ab50f4030cc73b5a082b71723f47a88bcc92f5c5;hb=b4f4b4b702e2ccd8a7c62fd2a5c184c5b1cbe665;hp=eb17d48ae775499080e9c194199cc91b54c3bacd;hpb=beaf57528af475963dc72aaa66c00f666d3ab7a6;p=openflowplugin.git diff --git a/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/dedicated/StatisticsGatheringOnTheFlyServiceTest.java b/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/dedicated/StatisticsGatheringOnTheFlyServiceTest.java index eb17d48ae7..ab50f4030c 100644 --- a/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/dedicated/StatisticsGatheringOnTheFlyServiceTest.java +++ b/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/dedicated/StatisticsGatheringOnTheFlyServiceTest.java @@ -13,9 +13,13 @@ import org.junit.Test; import org.mockito.Mockito; import org.opendaylight.openflowplugin.api.openflow.device.Xid; import org.opendaylight.openflowplugin.api.openflow.statistics.ofpspecific.EventIdentifier; +import org.opendaylight.openflowplugin.impl.datastore.MultipartWriterProviderFactory; import org.opendaylight.openflowplugin.impl.services.ServiceMocking; +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.inventory.rev130819.NodeId; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MultipartType; +import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartReply; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartRequestInput; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader; @@ -25,12 +29,17 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731 public class StatisticsGatheringOnTheFlyServiceTest extends ServiceMocking { public static final NodeId NODE_ID = new NodeId(DUMMY_NODE_ID); - private StatisticsGatheringOnTheFlyService statisticsGatheringService; + private StatisticsGatheringOnTheFlyService statisticsGatheringService; @Override protected void setup() { - statisticsGatheringService = new StatisticsGatheringOnTheFlyService(mockedRequestContextStack, mockedDeviceContext); - Mockito.doReturn(NODE_ID).when(mockedPrimConnectionContext).getNodeId(); + final ConvertorManager convertorManager = ConvertorManagerFactory.createDefaultManager(); + statisticsGatheringService = + new StatisticsGatheringOnTheFlyService<>(mockedRequestContextStack, + mockedDeviceContext, + convertorManager, + MultipartWriterProviderFactory + .createDefaultProvider(mockedDeviceContext)); Mockito.when(mockedDeviceInfo.getNodeId()).thenReturn(NODE_ID); Mockito.when(mockedDeviceContext.getDeviceInfo().getNodeId()).thenReturn(NODE_ID); } @@ -51,4 +60,4 @@ public class StatisticsGatheringOnTheFlyServiceTest extends ServiceMocking { Assert.assertEquals(xidValue, request.getXid().longValue()); Assert.assertNotNull(request); } -} \ No newline at end of file +}