Fix checkstyle violations in openflowplugin extensions
[openflowplugin.git] / extension / openflowplugin-extension-nicira / src / test / java / org / opendaylight / openflowplugin / extension / vendor / nicira / convertor / match / EthDstConvertorTest.java
index 0b93853424f9cfc0bd8813d8c9d72e3b85e28308..fbc693beae1e1e8b894d06bc9504a62f2cda48d4 100644 (file)
@@ -54,11 +54,13 @@ public class EthDstConvertorTest {
 
         final NxmOfEthDstBuilder nxmOfEthDstBuilder = new NxmOfEthDstBuilder()
                 .setMacAddress(MAC_ADDRESS);
-        final NxAugMatchNodesNodeTableFlowBuilder nxAugMatchNotifUpdateFlowStatsBuilder = new NxAugMatchNodesNodeTableFlowBuilder();
+        final NxAugMatchNodesNodeTableFlowBuilder nxAugMatchNotifUpdateFlowStatsBuilder =
+                new NxAugMatchNodesNodeTableFlowBuilder();
         nxAugMatchNotifUpdateFlowStatsBuilder.setNxmOfEthDst(nxmOfEthDstBuilder.build());
 
         final Augmentation<Extension> extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build();
-        when(extension.getAugmentation(Matchers.<Class<Augmentation<Extension>>>any())).thenReturn(extensionAugmentation);
+        when(extension.getAugmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+            .thenReturn(extensionAugmentation);
 
         ethDstConvertor = new EthDstConvertor();
 
@@ -66,8 +68,9 @@ public class EthDstConvertorTest {
 
     @Test
     public void testConvert() throws Exception {
-        final MatchEntry matchEntry = ethDstConvertor.convert(extension);
-        Assert.assertEquals(MAC_ADDRESS, ((EthDstCaseValue)matchEntry.getMatchEntryValue()).getEthDstValues().getMacAddress());
+        final MatchEntry converted = ethDstConvertor.convert(extension);
+        Assert.assertEquals(MAC_ADDRESS, ((EthDstCaseValue)converted.getMatchEntryValue())
+                .getEthDstValues().getMacAddress());
     }
 
     @Test
@@ -81,23 +84,28 @@ public class EthDstConvertorTest {
 
         when(matchEntry.getMatchEntryValue()).thenReturn(ethDstCaseValue);
 
-        final ExtensionAugment<? extends Augmentation<Extension>> extensionAugment = ethDstConvertor.convert(matchEntry, MatchPath.PACKETRECEIVED_MATCH);
-        Assert.assertEquals(MAC_ADDRESS, ((NxAugMatchNotifPacketIn)extensionAugment.getAugmentationObject()).getNxmOfEthDst().getMacAddress());
+        final ExtensionAugment<? extends Augmentation<Extension>> extensionAugment = ethDstConvertor.convert(matchEntry,
+                MatchPath.PACKET_RECEIVED_MATCH);
+        Assert.assertEquals(MAC_ADDRESS,
+                ((NxAugMatchNotifPacketIn) extensionAugment.getAugmentationObject()).getNxmOfEthDst().getMacAddress());
         Assert.assertEquals(extensionAugment.getKey(), NxmOfEthDstKey.class);
 
-        final ExtensionAugment<? extends Augmentation<Extension>> extensionAugment1 = ethDstConvertor.convert(matchEntry, MatchPath.SWITCHFLOWREMOVED_MATCH);
-        Assert.assertEquals(MAC_ADDRESS, ((NxAugMatchNotifSwitchFlowRemoved)extensionAugment1.getAugmentationObject()).getNxmOfEthDst().getMacAddress());
+        final ExtensionAugment<? extends Augmentation<Extension>> extensionAugment1 = ethDstConvertor
+                .convert(matchEntry, MatchPath.SWITCH_FLOW_REMOVED_MATCH);
+        Assert.assertEquals(MAC_ADDRESS, ((NxAugMatchNotifSwitchFlowRemoved) extensionAugment1.getAugmentationObject())
+                .getNxmOfEthDst().getMacAddress());
         Assert.assertEquals(extensionAugment.getKey(), NxmOfEthDstKey.class);
 
-        final ExtensionAugment<? extends Augmentation<Extension>> extensionAugment2 = ethDstConvertor.convert(matchEntry, MatchPath.FLOWSSTATISTICSUPDATE_FLOWANDSTATISTICSMAPLIST_MATCH);
-        Assert.assertEquals(MAC_ADDRESS, ((NxAugMatchNodesNodeTableFlow)extensionAugment2.getAugmentationObject()).getNxmOfEthDst().getMacAddress());
+        final ExtensionAugment<? extends Augmentation<Extension>> extensionAugment2 = ethDstConvertor
+                .convert(matchEntry, MatchPath.FLOWS_STATISTICS_UPDATE_MATCH);
+        Assert.assertEquals(MAC_ADDRESS, ((NxAugMatchNodesNodeTableFlow) extensionAugment2.getAugmentationObject())
+                .getNxmOfEthDst().getMacAddress());
         Assert.assertEquals(extensionAugment.getKey(), NxmOfEthDstKey.class);
 
-        final ExtensionAugment<? extends Augmentation<Extension>> extensionAugment3 = ethDstConvertor.convert(matchEntry, MatchPath.RPCFLOWSSTATISTICS_FLOWANDSTATISTICSMAPLIST_MATCH);
-        Assert.assertEquals(MAC_ADDRESS, ((NxAugMatchRpcGetFlowStats)extensionAugment3.getAugmentationObject()).getNxmOfEthDst().getMacAddress());
+        final ExtensionAugment<? extends Augmentation<Extension>> extensionAugment3 = ethDstConvertor
+                .convert(matchEntry, MatchPath.FLOWS_STATISTICS_RPC_MATCH);
+        Assert.assertEquals(MAC_ADDRESS, ((NxAugMatchRpcGetFlowStats) extensionAugment3.getAugmentationObject())
+                .getNxmOfEthDst().getMacAddress());
         Assert.assertEquals(extensionAugment.getKey(), NxmOfEthDstKey.class);
-
-
-
     }
 }