X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=openflowplugin-impl%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fopenflowplugin%2Fimpl%2Fstatistics%2FStatisticsContextImplParamTest.java;h=5b7c3743505aedcdb3f7643a06d6ac7688fb176a;hb=fe05dabd56d7bf254b034a0804ba666eeb4fd6d6;hp=c88578b1d83d114ef2cab1dc3048eb468ba4d36e;hpb=d10c556113e37e0cb9fa08ed47932f72ba454ee3;p=openflowplugin.git diff --git a/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/StatisticsContextImplParamTest.java b/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/StatisticsContextImplParamTest.java index c88578b1d8..5b7c374350 100644 --- a/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/StatisticsContextImplParamTest.java +++ b/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/StatisticsContextImplParamTest.java @@ -1,12 +1,9 @@ /* + * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved. * - * * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved. - * * - * * This program and the accompanying materials are made available under the - * * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * * and is available at http://www.eclipse.org/legal/epl-v10.html - * - * + * This program and the accompanying materials are made available under the + * 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; @@ -26,6 +23,8 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import org.opendaylight.openflowplugin.api.openflow.statistics.ofpspecific.EventIdentifier; +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.openflow.common.types.rev130731.MultipartType; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartReply; import org.opendaylight.yangtools.yang.common.RpcResult; @@ -64,8 +63,11 @@ public class StatisticsContextImplParamTest extends StatisticsContextImpMockInit @Test public void gatherDynamicDataTest() { + when(lifecycleService.getDeviceContext()).thenReturn(mockedDeviceContext); + when(mockedDeviceContext.getDeviceState()).thenReturn(mockedDeviceState); - final StatisticsContextImpl statisticsContext = new StatisticsContextImpl(mockedDeviceInfo, false, mockConductor); + final ConvertorManager convertorManager = ConvertorManagerFactory.createDefaultManager(); + final StatisticsContextImpl statisticsContext = new StatisticsContextImpl(mockedDeviceInfo, false, lifecycleService ,convertorManager, mockedStatisticsManager); final ListenableFuture>> rpcResult = immediateFuture(RpcResultBuilder.success(Collections.emptyList()).build()); when(mockedStatisticsGatheringService.getStatisticsOfType(any(EventIdentifier.class), any(MultipartType