X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=openflowplugin-impl%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fopenflowplugin%2Fimpl%2Ftranslator%2FAggregatedFlowStatisticsTranslatorTest.java;h=2d7bf1378435ed529e5ce0ea333f560a9c6a4348;hb=04b9d446f179f2ac149e089d8692a3f721e4f1ff;hp=a840fa9a4ae386fee01e45b4237938827ffd5cf6;hpb=18dc690ea2106eea6c2111d998581e8ded03231c;p=openflowplugin.git diff --git a/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/translator/AggregatedFlowStatisticsTranslatorTest.java b/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/translator/AggregatedFlowStatisticsTranslatorTest.java index a840fa9a4a..2d7bf13784 100644 --- a/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/translator/AggregatedFlowStatisticsTranslatorTest.java +++ b/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/translator/AggregatedFlowStatisticsTranslatorTest.java @@ -14,31 +14,30 @@ import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; -import org.mockito.runners.MockitoJUnitRunner; -import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext; -import org.opendaylight.openflowplugin.api.openflow.device.DeviceState; +import org.mockito.junit.MockitoJUnitRunner; +import org.opendaylight.openflowplugin.api.openflow.device.DeviceInfo; import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.get.aggregate.flow.statistics.from.flow.table._for.given.match.output.AggregatedFlowStatistics; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartReplyMessageBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyAggregateCaseBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.aggregate._case.MultipartReplyAggregateBuilder; /** - * Test of {@link AggregatedFlowStatisticsTranslator} + * Test of {@link AggregatedFlowStatisticsTranslator}. */ @RunWith(MockitoJUnitRunner.class) public class AggregatedFlowStatisticsTranslatorTest { private AggregatedFlowStatisticsTranslator translator; @Mock - private DeviceState deviceState; + private DeviceInfo deviceInfo; @Before - public void setUp() throws Exception { + public void setUp() { translator = new AggregatedFlowStatisticsTranslator(); } @Test - public void testTranslate() throws Exception { + public void testTranslate() { MultipartReplyAggregateBuilder aggregateStatsValueBld = new MultipartReplyAggregateBuilder() .setByteCount(BigInteger.valueOf(1L)) .setFlowCount(2L) @@ -48,7 +47,7 @@ public class AggregatedFlowStatisticsTranslatorTest { MultipartReplyMessageBuilder mpInputBld = new MultipartReplyMessageBuilder() .setMultipartReplyBody(inputBld.build()); - final AggregatedFlowStatistics statistics = translator.translate(mpInputBld.build(), deviceState, null); + final AggregatedFlowStatistics statistics = translator.translate(mpInputBld.build(), deviceInfo, null); Assert.assertEquals(aggregateStatsValueBld.getByteCount(), statistics.getByteCount().getValue()); Assert.assertEquals(aggregateStatsValueBld.getFlowCount(), statistics.getFlowCount().getValue());