Fix checkstyle violations in openflow-protocol-impl - part 9 90/67390/2
authorTom Pantelis <tompantelis@gmail.com>
Sun, 21 Jan 2018 01:12:03 +0000 (20:12 -0500)
committerTom Pantelis <tompantelis@gmail.com>
Sat, 27 Jan 2018 02:30:26 +0000 (21:30 -0500)
Many violations - more to follow

Change-Id: Ide57e636e33d752cd9a6c912de071fd1493a7097
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
57 files changed:
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/DeserializationFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/DeserializerRegistryImplTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/MessageTypeCodeKeyTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/TypeToClassMapInitializerTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/ErrorMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/ExperimenterMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/FeaturesReplyMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/FlowModInputMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/FlowRemovedMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/GetAsyncReplyMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/GetAsyncRequestMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/GetFeaturesInputFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/GetQueueConfigInputMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/GroupModInputMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/HelloMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/MeterModInputMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/MultipartReplyMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/MultipartRequestAggregateInputMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/MultipartRequestDescInputMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/MultipartRequestFlowInputMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/MultipartRequestGroupInputMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/MultipartRequestMeterConfigInputMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/MultipartRequestMeterInputMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/MultipartRequestPortStatsInputMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/MultipartRequestQueueInputMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/MultipartRequestTableFeaturesInputMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/MultipartRequestTableInputMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/OF10ErrorMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/OF10FeaturesReplyMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/OF10FeaturesRequestMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/OF10FlowModInputMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/OF10FlowRemovedMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/OF10GetQueueConfigInputMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/OF10HelloMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/OF10PacketInMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/OF10PacketOutInputMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/OF10PortModInputMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/OF10PortStatusMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/OF10QueueGetConfigReplyMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/OF10StatsReplyMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/OF10StatsRequestInputAggregateFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/OF10StatsRequestInputDescFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/OF10StatsRequestInputFlowFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/OF10StatsRequestInputPortStatsFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/OF10StatsRequestInputQueueFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/OF10StatsRequestInputTableFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/PacketInMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/PacketOutInputMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/PortModInputMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/PortStatusMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/QueueGetConfigReplyMessageFactoryMultiTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/QueueGetConfigReplyMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/RoleReplyMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/RoleRequestInputMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/SetAsyncInputMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/TableModInputMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/VendorMessageFactoryTest.java

index 965e299b1d1a18e29e814420a9ab4803ac9eb092..32bff8503315df98fd29ac42c058b59f5429bb31 100644 (file)
@@ -9,20 +9,21 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization;
 
 import static org.junit.Assert.assertEquals;
+
 import io.netty.buffer.ByteBuf;
 import io.netty.buffer.PooledByteBufAllocator;
-
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 
 /**
- * @author michal.polkorab
+ * Unit tests for DeserializationFactory.
  *
+ * @author michal.polkorab
  */
 public class DeserializationFactoryTest {
 
     /**
-     * Test deserializer lookup & deserialization
+     * Test deserializer lookup & deserialization.
      */
     @Test
     public void test() {
@@ -39,9 +40,9 @@ public class DeserializationFactoryTest {
     }
 
     /**
-     * Test deserializer lookup & deserialization
+     * Test deserializer lookup & deserialization.
      */
-    @Test(expected=NullPointerException.class)
+    @Test(expected = NullPointerException.class)
     public void testNotExistingDeserializer() {
         DeserializerRegistryImpl registry = new DeserializerRegistryImpl();
         registry.init();
@@ -53,4 +54,4 @@ public class DeserializationFactoryTest {
         buffer.writeInt(1234);
         factory.deserialize(buffer, (short) 0);
     }
-}
\ No newline at end of file
+}
index a689db6b02bee6ef0e1ee9f40c54ef48d4fee4e3..097b630d9f0bb50b0caeb741fa3aa43b698250fa 100644 (file)
@@ -14,10 +14,11 @@ import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.util.MatchDeserializer;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.grouping.Match;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.v10.grouping.MatchV10;
+
 /**
+ * Unit tests for DeserializerRegistryImpl.
  *
  * @author madamjak
- *
  */
 public class DeserializerRegistryImplTest {
 
@@ -26,61 +27,63 @@ public class DeserializerRegistryImplTest {
     private static final int EMPTY_VALUE = EncodeConstants.EMPTY_VALUE;
 
     /**
-     * Test - register deserializer without arguments
+     * Test - register deserializer without arguments.
      */
     @Test(expected = IllegalArgumentException.class)
-    public void testRegisterDeserializerNoArgs(){
+    public void testRegisterDeserializerNoArgs() {
         DeserializerRegistryImpl serReg = new DeserializerRegistryImpl();
         serReg.registerDeserializer(null, null);
     }
 
     /**
-     * Test - register deserializer with no key
+     * Test - register deserializer with no key.
      */
     @Test(expected = IllegalArgumentException.class)
-    public void testRegisterDeserializerNoKey(){
+    public void testRegisterDeserializerNoKey() {
         DeserializerRegistryImpl serReg = new DeserializerRegistryImpl();
         serReg.registerDeserializer(null, new MatchDeserializer());
     }
 
     /**
-     * Test - register deserializer with no deserializer
+     * Test - register deserializer with no deserializer.
      */
     @Test(expected = IllegalArgumentException.class)
-    public void testRegisterDeserializerNoDeserializer(){
+    public void testRegisterDeserializerNoDeserializer() {
         DeserializerRegistryImpl serReg = new DeserializerRegistryImpl();
         serReg.registerDeserializer(new MessageCodeKey(OF13, EMPTY_VALUE, Match.class), null);
     }
 
     /**
-     * Test - unregister deserializer without MessageTypeKey
+     * Test - unregister deserializer without MessageTypeKey.
      */
     @Test(expected = IllegalArgumentException.class)
-    public void testUnRegisterDeserializerNoMessageTypeKey(){
+    public void testUnRegisterDeserializerNoMessageTypeKey() {
         DeserializerRegistryImpl derserReg = new DeserializerRegistryImpl();
         derserReg.init();
         derserReg.unregisterDeserializer(null);
     }
 
     /**
-     * Test - unregister deserializer
+     * Test - unregister deserializer.
      */
     @Test
-    public void testUnRegisterDeserializer(){
+    public void testUnRegisterDeserializer() {
         DeserializerRegistryImpl derserReg = new DeserializerRegistryImpl();
         derserReg.init();
-        Assert.assertTrue("Wrong - unregister serializer",derserReg.unregisterDeserializer(new MessageCodeKey(OF13,EMPTY_VALUE, Match.class)));
-        Assert.assertFalse("Wrong - unregister serializer",derserReg.unregisterDeserializer(new MessageCodeKey(OF10,EMPTY_VALUE, Match.class)));
+        Assert.assertTrue("Wrong - unregister serializer",derserReg.unregisterDeserializer(
+                new MessageCodeKey(OF13,EMPTY_VALUE, Match.class)));
+        Assert.assertFalse("Wrong - unregister serializer",derserReg.unregisterDeserializer(
+                new MessageCodeKey(OF10,EMPTY_VALUE, Match.class)));
     }
 
     /**
-     * Test - get deserializer
+     * Test - get deserializer.
      */
-    @Test(expected=IllegalStateException.class)
-    public void testGetDeserializer(){
+    @Test(expected = IllegalStateException.class)
+    public void testGetDeserializer() {
         DeserializerRegistryImpl registry = new DeserializerRegistryImpl();
         registry.init();
         registry.getDeserializer(new MessageCodeKey((short) 5000, EncodeConstants.EMPTY_VALUE, MatchV10.class));
         Assert.fail();
     }
-}
\ No newline at end of file
+}
index 165d613bc8a5da6ee3fce97566f01394e3332d46..f436faacc1c1d6441e1528080424b9ee369bdb28 100644 (file)
@@ -13,21 +13,21 @@ import org.junit.Test;
 
 
 /**
+ * Unit tests for MessageTypeCodeKey.
  *
  * @author madamjak
- *
  */
 public class MessageTypeCodeKeyTest {
 
     /**
-     * Tests equals and hashCode
+     * Tests equals and hashCode.
      */
     @Test
-    public void testEqualsAndHashcode(){
-        short msgType1 = 12;
-        short msgVersion1 = 34;
-        short msgType2 = 21;
-        short msgVersion2 = 43;
+    public void testEqualsAndHashcode() {
+        final short msgType1 = 12;
+        final short msgVersion1 = 34;
+        final short msgType2 = 21;
+        final short msgVersion2 = 43;
         MessageTypeCodeKey key1 = new MessageTypeCodeKey(msgVersion1, msgType1);
 
         Assert.assertTrue("Wrong - equals to same object", key1.equals(key1));
@@ -48,10 +48,10 @@ public class MessageTypeCodeKeyTest {
     }
 
     /**
-     * Tests getters
+     * Tests getters.
      */
     @Test
-    public void testGetter(){
+    public void testGetter() {
         short msgType = 12;
         short msgVersion = 34;
         MessageTypeCodeKey key1 = new MessageTypeCodeKey(msgVersion, msgType);
@@ -59,4 +59,4 @@ public class MessageTypeCodeKeyTest {
         Assert.assertEquals(msgType, key1.getMsgType());
         Assert.assertEquals(msgVersion, key1.getMsgVersion());
     }
-}
\ No newline at end of file
+}
index dfa01580279314737596de33bf122494a91e89bf..66053b3e802f1aaff3d38d0fa1eccfa19480bbe1 100644 (file)
@@ -13,8 +13,8 @@ import static org.junit.Assert.assertEquals;
 import java.util.HashMap;
 import java.util.Map;
 import org.junit.Test;
-import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.keys.TypeToClassKey;
+import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.BarrierInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.BarrierOutput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.EchoOutput;
@@ -151,4 +151,4 @@ public class TypeToClassMapInitializerTest {
         assertEquals("Wrong class", BarrierInput.class, messageClassMap.get(new TypeToClassKey(version, 20)));
     }
 
-}
\ No newline at end of file
+}
index 0d7dc5c40b21f1b927339e55933f685eb4d1277a..e5ba2d89d2af7b0ad19a586a0eba06a89eab8bc3 100644 (file)
@@ -9,7 +9,6 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.factories;
 
 import io.netty.buffer.ByteBuf;
-
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
@@ -24,6 +23,8 @@ import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.ErrorMessage;
 
 /**
+ * Unit tests for ErrorMessageFactory.
+ *
  * @author michal.polkorab
  * @author timotej.kubas
  */
@@ -36,7 +37,7 @@ public class ErrorMessageFactoryTest {
     private ErrorMessageFactory errorFactory;
 
     /**
-     * Initializes deserializer registry and lookups correct deserializer
+     * Initializes deserializer registry and lookups correct deserializer..
      */
     @Before
     public void startUp() {
@@ -44,7 +45,7 @@ public class ErrorMessageFactoryTest {
     }
 
     /**
-     * Test of {@link ErrorMessageFactory} for correct translation into POJO
+     * Test of {@link ErrorMessageFactory} for correct translation into POJO.
      */
     @Test
     public void testWithoutData() {
@@ -191,7 +192,7 @@ public class ErrorMessageFactoryTest {
 
     /**
      * Test of {@link ErrorMessageFactory} for correct translation into POJO
-     * - not existing code used
+     * - not existing code used.
      */
     @Test
     public void testWithoutData2() {
@@ -337,7 +338,7 @@ public class ErrorMessageFactoryTest {
     }
 
     /**
-     * Test of {@link ErrorMessageFactory} for correct translation into POJO
+     * Test of {@link ErrorMessageFactory} for correct translation into POJO.
      */
     @Test
     public void testWithData() {
@@ -353,7 +354,7 @@ public class ErrorMessageFactoryTest {
     }
 
     /**
-     * Test of {@link ErrorMessageFactory} for correct translation into POJO
+     * Test of {@link ErrorMessageFactory} for correct translation into POJO.
      */
     @Test
     public void testWithIncorrectTypeEnum() {
@@ -369,7 +370,7 @@ public class ErrorMessageFactoryTest {
     }
 
     /**
-     * Test of {@link ErrorMessageFactory} for correct translation into POJO
+     * Test of {@link ErrorMessageFactory} for correct translation into POJO.
      */
     @Test
     public void testWithIncorrectCodeEnum() {
@@ -385,7 +386,7 @@ public class ErrorMessageFactoryTest {
     }
 
     /**
-     * Test of {@link ErrorMessageFactory} for correct translation into POJO
+     * Test of {@link ErrorMessageFactory} for correct translation into POJO.
      */
     @Test
     public void testExperimenterError() {
@@ -396,4 +397,4 @@ public class ErrorMessageFactoryTest {
 
         Mockito.verify(deserializer, Mockito.times(1)).deserialize(bb);
     }
-}
\ No newline at end of file
+}
index 37dd6ddeb9f4da980b536ded0ae0f5cc43e3c526..2568f743831a385b1fd9dd693ac20fcf789bfc49 100644 (file)
@@ -26,8 +26,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.experimenter.core.ExperimenterDataOfChoice;
 
 /**
- * @author michal.polkorab
+ * Unit tests for ExperimenterMessageFactory.
  *
+ * @author michal.polkorab
  */
 @RunWith(MockitoJUnitRunner.class)
 public class ExperimenterMessageFactoryTest {
@@ -38,7 +39,7 @@ public class ExperimenterMessageFactoryTest {
     private ExperimenterMessageFactory factory;
 
     /**
-     * Initializes mocks
+     * Initializes mocks.
      */
     @Before
     public void startUp() {
@@ -46,7 +47,7 @@ public class ExperimenterMessageFactoryTest {
     }
 
     /**
-     * Test deserializer lookup correctness
+     * Test deserializer lookup correctness.
      */
     @Test
     public void test() {
@@ -59,4 +60,4 @@ public class ExperimenterMessageFactoryTest {
         Assert.assertEquals("Wrong return value", message, deserializedMessage.getExperimenterDataOfChoice());
         Assert.assertEquals("ByteBuf index moved", 0, buffer.readableBytes());
     }
-}
\ No newline at end of file
+}
index 1c6fc70391586f8cc497acd4d199c82b4de7225c..9f64c805601fa5bda949767c53ce256a453b492e 100644 (file)
@@ -9,20 +9,21 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.factories;
 
 import io.netty.buffer.ByteBuf;
-
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegistry;
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
 import org.opendaylight.openflowjava.protocol.api.keys.MessageCodeKey;
+import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.deserialization.DeserializerRegistryImpl;
 import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;
-import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.Capabilities;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetFeaturesOutput;
 
 /**
+ * Unit tests for FeaturesReplyMessageFactory.
+ *
  * @author michal.polkorab
  * @author timotej.kubas
  */
@@ -31,7 +32,7 @@ public class FeaturesReplyMessageFactoryTest {
     private OFDeserializer<GetFeaturesOutput> featuresFactory;
 
     /**
-     * Initializes deserializer registry and lookups correct deserializer
+     * Initializes deserializer registry and lookups correct deserializer.
      */
     @Before
     public void startUp() {
@@ -42,7 +43,7 @@ public class FeaturesReplyMessageFactoryTest {
     }
 
     /**
-     * Testing {@link FeaturesReplyMessageFactory} for correct translation into POJO
+     * Testing {@link FeaturesReplyMessageFactory} for correct translation into POJO.
      */
     @Test
     public void test() {
@@ -55,13 +56,14 @@ public class FeaturesReplyMessageFactoryTest {
         Assert.assertEquals("Wrong buffers", 0x00010203L, builtByFactory.getBuffers().longValue());
         Assert.assertEquals("Wrong number of tables", 0x01, builtByFactory.getTables().shortValue());
         Assert.assertEquals("Wrong auxiliaryId", 0x01, builtByFactory.getAuxiliaryId().shortValue());
-        Assert.assertEquals("Wrong capabilities", new Capabilities(false, false, false, false, false, false, false), builtByFactory.getCapabilities());
+        Assert.assertEquals("Wrong capabilities", new Capabilities(false, false, false, false, false, false, false),
+                builtByFactory.getCapabilities());
         Assert.assertEquals("Wrong reserved", 0x00010203L, builtByFactory.getReserved().longValue());
     }
 
     /**
      * Testing {@link FeaturesReplyMessageFactory} for correct translation into POJO
-     * (capabilities set)
+     * (capabilities set).
      */
     @Test
     public void testCapabilities() {
@@ -70,6 +72,7 @@ public class FeaturesReplyMessageFactoryTest {
         GetFeaturesOutput builtByFactory = BufferHelper.deserialize(featuresFactory, bb);
 
         BufferHelper.checkHeaderV13(builtByFactory);
-        Assert.assertEquals("Wrong capabilities", new Capabilities(true, true, true, true, true, true, true), builtByFactory.getCapabilities());
+        Assert.assertEquals("Wrong capabilities", new Capabilities(true, true, true, true, true, true, true),
+                builtByFactory.getCapabilities());
     }
-}
\ No newline at end of file
+}
index f98564bd064df6e2b014d587abb2d21810d1a432..46873c5d5cc5b976aa05a45afddf5154489d26f8 100644 (file)
@@ -51,14 +51,15 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.matc
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.FlowModInput;
 
 /**
- * @author giuseppex.petralia@intel.com
+ * Unit tests for FlowModInputMessageFactory.
  *
+ * @author giuseppex.petralia@intel.com
  */
 public class FlowModInputMessageFactoryTest {
     private OFDeserializer<FlowModInput> flowFactory;
 
     /**
-     * Initializes deserializer registry and lookups correct deserializer
+     * Initializes deserializer registry and lookups correct deserializer.
      */
     @Before
     public void startUp() {
@@ -70,11 +71,11 @@ public class FlowModInputMessageFactoryTest {
 
     @Test
     public void test() throws Exception {
-        ByteBuf bb = BufferHelper
-                .buildBuffer("ff 01 04 01 06 00 07 01 ff 05 00 00 09 30 00 30 41 02 00 0c 00 00 00 7e 00 "
-                        + "00 00 02 00 00 11 46 00 00 00 62 00 0b 00 00 00 01 00 11 80 00 02 04 00 00 00 2a 80 00 12 01 04 00 "
-                        + "00 00 00 00 00 00 00 01 00 08 2b 00 00 00 00 02 00 18 00 00 00 00 ff 01 04 01 06 00 07 01 ff 05 00 00 "
-                        + "09 30 00 30 00 04 00 18 00 00 00 00 00 00 00 10 00 00 00 2a 00 34 00 00 00 00 00 00");
+        ByteBuf bb = BufferHelper.buildBuffer(
+            "ff 01 04 01 06 00 07 01 ff 05 00 00 09 30 00 30 41 02 00 0c 00 00 00 7e 00 "
+            + "00 00 02 00 00 11 46 00 00 00 62 00 0b 00 00 00 01 00 11 80 00 02 04 00 00 00 2a 80 00 12 01 04 00 "
+            + "00 00 00 00 00 00 00 01 00 08 2b 00 00 00 00 02 00 18 00 00 00 00 ff 01 04 01 06 00 07 01 ff 05 00 00 "
+            + "09 30 00 30 00 04 00 18 00 00 00 00 00 00 00 10 00 00 00 2a 00 34 00 00 00 00 00 00");
         FlowModInput deserializedMessage = BufferHelper.deserialize(flowFactory, bb);
         BufferHelper.checkHeaderV13(deserializedMessage);
         byte[] cookie = new byte[] { (byte) 0xFF, 0x01, 0x04, 0x01, 0x06, 0x00, 0x07, 0x01 };
@@ -97,7 +98,7 @@ public class FlowModInputMessageFactoryTest {
     }
 
     private List<Instruction> createInstructions() {
-        List<Instruction> instructions = new ArrayList<>();
+        final List<Instruction> instructions = new ArrayList<>();
         InstructionBuilder insBuilder = new InstructionBuilder();
         GotoTableCaseBuilder goToCaseBuilder = new GotoTableCaseBuilder();
         GotoTableBuilder instructionBuilder = new GotoTableBuilder();
@@ -115,10 +116,10 @@ public class FlowModInputMessageFactoryTest {
         insBuilder.setInstructionChoice(metadataCaseBuilder.build());
         instructions.add(insBuilder.build());
         insBuilder = new InstructionBuilder();
-        ApplyActionsCaseBuilder applyActionsCaseBuilder = new ApplyActionsCaseBuilder();
-        ApplyActionsBuilder actionsBuilder = new ApplyActionsBuilder();
-        List<Action> actions = new ArrayList<>();
-        ActionBuilder actionBuilder = new ActionBuilder();
+        final ApplyActionsCaseBuilder applyActionsCaseBuilder = new ApplyActionsCaseBuilder();
+        final ApplyActionsBuilder actionsBuilder = new ApplyActionsBuilder();
+        final List<Action> actions = new ArrayList<>();
+        final ActionBuilder actionBuilder = new ActionBuilder();
         OutputActionCaseBuilder caseBuilder = new OutputActionCaseBuilder();
         OutputActionBuilder outputBuilder = new OutputActionBuilder();
         outputBuilder.setPort(new PortNumber(42L));
@@ -136,7 +137,7 @@ public class FlowModInputMessageFactoryTest {
     private Match createMatch() {
         MatchBuilder matchBuilder = new MatchBuilder();
         matchBuilder.setType(OxmMatchType.class);
-        List<MatchEntry> entries = new ArrayList<>();
+        final List<MatchEntry> entries = new ArrayList<>();
         MatchEntryBuilder entriesBuilder = new MatchEntryBuilder();
         entriesBuilder.setOxmClass(OpenflowBasicClass.class);
         entriesBuilder.setOxmMatchField(InPhyPort.class);
index 5f9d65a3eea90618f9f429cac5ff77bcbe3fdaa2..7b18e148cff5dabfcde1d19bc6fef50d3438256c 100644 (file)
@@ -9,20 +9,21 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.factories;
 
 import io.netty.buffer.ByteBuf;
-
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegistry;
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
 import org.opendaylight.openflowjava.protocol.api.keys.MessageCodeKey;
+import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.deserialization.DeserializerRegistryImpl;
 import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;
-import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.TableId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.FlowRemovedMessage;
 
 /**
+ * Unit tests for FlowRemovedMessageFactory.
+ *
  * @author timotej.kubas
  * @author michal.polkorab
  */
@@ -31,7 +32,7 @@ public class FlowRemovedMessageFactoryTest {
     private OFDeserializer<FlowRemovedMessage> flowFactory;
 
     /**
-     * Initializes deserializer registry and lookups correct deserializer
+     * Initializes deserializer registry and lookups correct deserializer.
      */
     @Before
     public void startUp() {
@@ -42,10 +43,10 @@ public class FlowRemovedMessageFactoryTest {
     }
 
     /**
-     * Testing {@link FlowRemovedMessageFactory} for correct translation into POJO
+     * Testing {@link FlowRemovedMessageFactory} for correct translation into POJO.
      */
     @Test
-    public void test(){
+    public void test() {
         ByteBuf bb = BufferHelper.buildBuffer("00 01 02 03 04 05 06 07 00 03 02 04 00 00 00 02"
                 + " 00 00 00 05 00 01 00 03 00 01 02 03 04 05 06 07 00 01 02 03 04 05 06 07");
         FlowRemovedMessage builtByFactory = BufferHelper.deserialize(flowFactory, bb);
index 4cb07da24f9b5af458ef13e82533e96442868ba1..ea7e6d42c8ba8571c40a73621ddaf0db83e3ae3e 100644 (file)
@@ -9,19 +9,17 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.factories;
 
 import io.netty.buffer.ByteBuf;
-
 import java.util.ArrayList;
 import java.util.List;
-
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegistry;
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
 import org.opendaylight.openflowjava.protocol.api.keys.MessageCodeKey;
+import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.deserialization.DeserializerRegistryImpl;
 import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;
-import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.FlowRemovedReason;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PacketInReason;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortReason;
@@ -34,15 +32,16 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.async.body.grouping.PortStatusMaskBuilder;
 
 /**
- * @author timotej.kubas
+ * Unit tests for GetAsyncReplyMessageFactory.
  *
+ * @author timotej.kubas
  */
 public class GetAsyncReplyMessageFactoryTest {
 
     private OFDeserializer<GetAsyncOutput> asyncFactory;
 
     /**
-     * Initializes deserializer registry and lookups correct deserializer
+     * Initializes deserializer registry and lookups correct deserializer.
      */
     @Before
     public void startUp() {
@@ -53,16 +52,12 @@ public class GetAsyncReplyMessageFactoryTest {
     }
 
     /**
-     * Testing {@link GetAsyncReplyMessageFactory} for correct translation into POJO
+     * Testing {@link GetAsyncReplyMessageFactory} for correct translation into POJO.
      */
     @Test
     public void testGetAsyncReplyMessage() {
-        ByteBuf bb = BufferHelper.buildBuffer("00 00 00 07 "+
-                                              "00 00 00 00 "+
-                                              "00 00 00 07 "+
-                                              "00 00 00 00 "+
-                                              "00 00 00 0F "+
-                                              "00 00 00 00");
+        ByteBuf bb = BufferHelper.buildBuffer(
+                "00 00 00 07 " + "00 00 00 00 " + "00 00 00 07 " + "00 00 00 00 " + "00 00 00 0F " + "00 00 00 00");
         GetAsyncOutput builtByFactory = BufferHelper.deserialize(asyncFactory, bb);
 
         BufferHelper.checkHeaderV13(builtByFactory);
@@ -72,7 +67,7 @@ public class GetAsyncReplyMessageFactoryTest {
     }
 
     private static List<PacketInMask> createPacketInMask() {
-        List<PacketInMask> inMasks = new ArrayList<>();
+        final List<PacketInMask> inMasks = new ArrayList<>();
         PacketInMaskBuilder maskBuilder;
         // OFPCR_ROLE_EQUAL or OFPCR_ROLE_MASTER
         maskBuilder = new PacketInMaskBuilder();
@@ -91,7 +86,7 @@ public class GetAsyncReplyMessageFactoryTest {
     }
 
     private static List<PortStatusMask> createPortStatusMask() {
-        List<PortStatusMask> inMasks = new ArrayList<>();
+        final List<PortStatusMask> inMasks = new ArrayList<>();
         PortStatusMaskBuilder maskBuilder;
         // OFPCR_ROLE_EQUAL or OFPCR_ROLE_MASTER
         maskBuilder = new PortStatusMaskBuilder();
@@ -109,7 +104,7 @@ public class GetAsyncReplyMessageFactoryTest {
     }
 
     private static List<FlowRemovedMask> createFlowRemovedMask() {
-        List<FlowRemovedMask> inMasks = new ArrayList<>();
+        final List<FlowRemovedMask> inMasks = new ArrayList<>();
         FlowRemovedMaskBuilder maskBuilder;
         // OFPCR_ROLE_EQUAL or OFPCR_ROLE_MASTER
         maskBuilder = new FlowRemovedMaskBuilder();
@@ -127,4 +122,4 @@ public class GetAsyncReplyMessageFactoryTest {
         inMasks.add(maskBuilder.build());
         return inMasks;
     }
-}
\ No newline at end of file
+}
index dba971e3a66a1b03fb76f6101e300ad6c0549822..c4aaf2b9fc618b3c5e13c140a2a6204998f6fc73 100644 (file)
@@ -19,8 +19,9 @@ import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetAsyncInput;
 
 /**
- * @author giuseppex.petralia@intel.com
+ * Unit tests for GetAsyncRequestMessageFactory.
  *
+ * @author giuseppex.petralia@intel.com
  */
 public class GetAsyncRequestMessageFactoryTest {
     private OFDeserializer<GetAsyncInput> factory;
index 0615098ce9a1b4210a63dd7c81b63e112ddf6425..7164d7cf672d61563cef60884c61fd9234da71b9 100644 (file)
@@ -19,8 +19,9 @@ import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetFeaturesInput;
 
 /**
- * @author giuseppex.petralia@intel.com
+ * UNit tests for GetFeaturesInputFactory.
  *
+ * @author giuseppex.petralia@intel.com
  */
 public class GetFeaturesInputFactoryTest {
     private OFDeserializer<GetFeaturesInput> factory;
index 95f5197d82cfc1dfa0d54e88093e926a1e476875..a62733da31d962b8e67e65f3f9de178f51e7c754 100644 (file)
@@ -21,8 +21,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev13
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetQueueConfigInput;
 
 /**
- * @author giuseppex.petralia@intel.com
+ * UNit tests for GetQueueConfigInputMessageFactory.
  *
+ * @author giuseppex.petralia@intel.com
  */
 public class GetQueueConfigInputMessageFactoryTest {
     private OFDeserializer<GetQueueConfigInput> factory;
index 0ede670d675f939a528d389e6e777c3b38db2adf..88efab43987ac64d796e47a2e398028ecfb30ae5 100644 (file)
@@ -25,8 +25,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.buckets.grouping.BucketsList;
 
 /**
- * @author giuseppex.petralia@intel.com
+ * Unit tests for GroupModInputMessageFactory.
  *
+ * @author giuseppex.petralia@intel.com
  */
 public class GroupModInputMessageFactoryTest {
     private OFDeserializer<GroupModInput> factory;
index d4ec69d4460fe675387a0ddf724197129451f5be..a5034cef1ea57cc8c1b984c9d67a832a7480813d 100644 (file)
@@ -67,7 +67,8 @@ public class HelloMessageFactoryTest extends DefaultDeserializerFactoryTest<Hell
         HelloMessage builtByFactory = BufferHelper.deserialize(factory, bb);
         List<Elements> element = createElement(4,HelloElementType.VERSIONBITMAP.getIntValue());
         Assert.assertEquals("Wrong type", element.get(0).getType(), builtByFactory.getElements().get(0).getType());
-        Assert.assertEquals("Wrong versionBitmap", element.get(0).getVersionBitmap(), builtByFactory.getElements().get(0).getVersionBitmap());
+        Assert.assertEquals("Wrong versionBitmap", element.get(0).getVersionBitmap(),
+                builtByFactory.getElements().get(0).getVersionBitmap());
     }
 
     /**
@@ -84,14 +85,15 @@ public class HelloMessageFactoryTest extends DefaultDeserializerFactoryTest<Hell
         HelloMessage builtByFactory = BufferHelper.deserialize(factory, bb);
         List<Elements> element = createElement(8,HelloElementType.VERSIONBITMAP.getIntValue());
         Assert.assertEquals("Wrong type", element.get(0).getType(), builtByFactory.getElements().get(0).getType());
-        Assert.assertEquals("Wrong versionBitmap", element.get(0).getVersionBitmap(), builtByFactory.getElements().get(0).getVersionBitmap());
+        Assert.assertEquals("Wrong versionBitmap", element.get(0).getVersionBitmap(),
+                builtByFactory.getElements().get(0).getVersionBitmap());
     }
 
     /**
      * Testing {@link HelloMessageFactory} if incorrect version is set.
      */
     @Test
-    public void testBadType(){
+    public void testBadType() {
         ByteBuf bb = BufferHelper.buildBuffer("00 02 " // type
                                             + "00 0c " // length
                                             + "00 00 00 11 " // bitmap 1
@@ -103,8 +105,8 @@ public class HelloMessageFactoryTest extends DefaultDeserializerFactoryTest<Hell
     }
 
     private static List<Elements> createElement(int lengthInByte, int type) {
-        ElementsBuilder elementsBuilder = new ElementsBuilder();
-        List<Elements> elementsList = new ArrayList<>();
+        final ElementsBuilder elementsBuilder = new ElementsBuilder();
+        final List<Elements> elementsList = new ArrayList<>();
         List<Boolean> booleanList = new ArrayList<>();
         booleanList.add(true);
         booleanList.add(false);
@@ -112,7 +114,7 @@ public class HelloMessageFactoryTest extends DefaultDeserializerFactoryTest<Hell
         booleanList.add(false);
         booleanList.add(true);
         int inSize = booleanList.size();
-        for (int i = 1; i < ((lengthInByte * 8) - inSize + 1); i++) {
+        for (int i = 1; i < lengthInByte * 8 - inSize + 1; i++) {
             booleanList.add(false);
         }
         elementsBuilder.setType(HelloElementType.forValue(type));
index 72c025006c2e38e0b8bc044016ccce0d44767330..1ce17d29f936e1f7e5393e47748f47e719f37ac5 100644 (file)
@@ -32,8 +32,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.meter.mod.BandsBuilder;
 
 /**
- * @author giuseppex.petralia@intel.com
+ * Unit tests for MeterModInputMessageFactory.
  *
+ * @author giuseppex.petralia@intel.com
  */
 public class MeterModInputMessageFactoryTest {
 
@@ -63,16 +64,16 @@ public class MeterModInputMessageFactoryTest {
     }
 
     private static List<Bands> createBandsList() {
-        List<Bands> bandsList = new ArrayList<>();
-        BandsBuilder bandsBuilder = new BandsBuilder();
-        MeterBandDropCaseBuilder dropCaseBuilder = new MeterBandDropCaseBuilder();
+        final List<Bands> bandsList = new ArrayList<>();
+        final BandsBuilder bandsBuilder = new BandsBuilder();
+        final MeterBandDropCaseBuilder dropCaseBuilder = new MeterBandDropCaseBuilder();
         MeterBandDropBuilder dropBand = new MeterBandDropBuilder();
         dropBand.setType(MeterBandType.OFPMBTDROP);
         dropBand.setRate(1L);
         dropBand.setBurstSize(2L);
         dropCaseBuilder.setMeterBandDrop(dropBand.build());
         bandsList.add(bandsBuilder.setMeterBand(dropCaseBuilder.build()).build());
-        MeterBandDscpRemarkCaseBuilder dscpCaseBuilder = new MeterBandDscpRemarkCaseBuilder();
+        final MeterBandDscpRemarkCaseBuilder dscpCaseBuilder = new MeterBandDscpRemarkCaseBuilder();
         MeterBandDscpRemarkBuilder dscpRemarkBand = new MeterBandDscpRemarkBuilder();
         dscpRemarkBand.setType(MeterBandType.OFPMBTDSCPREMARK);
         dscpRemarkBand.setRate(1L);
index 088201b379e572fa444702eef0a076a209c672df..2ee91747023c8b982ef53f4719d04bfd60a9f97b 100644 (file)
@@ -9,9 +9,7 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.factories;
 
 import io.netty.buffer.ByteBuf;
-
 import java.math.BigInteger;
-
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
@@ -69,15 +67,19 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
+ * Unit tests for MultipartReplyMessageFactory.
+ *
  * @author timotej.kubas
  * @author michal.polkorab
  */
 public class MultipartReplyMessageFactoryTest {
+    static final int DESC_STR_LEN = 256;
+    static final int SERIAL_NUM_LEN = 32;
 
     private OFDeserializer<MultipartReplyMessage> multipartFactory;
 
     /**
-     * Initializes deserializer registry and lookups correct deserializer
+     * Initializes deserializer registry and lookups correct deserializer.
      */
     @Before
     public void startUp() {
@@ -91,12 +93,10 @@ public class MultipartReplyMessageFactoryTest {
             .getLogger(MultipartReplyMessageFactoryTest.class);
 
     /**
-     * Testing {@link MultipartReplyMessageFactory} for correct translation into POJO
+     * Testing {@link MultipartReplyMessageFactory} for correct translation into POJO.
      */
     @Test
-    public void testMultipartReplyDescBody(){
-        final int DESC_STR_LEN = 256;
-        final int SERIAL_NUM_LEN = 32;
+    public void testMultipartReplyDescBody() {
         ByteBuf bb = BufferHelper.buildBuffer("00 00 00 01 00 00 00 00");
 
         String mfrDesc = "Manufacturer description";
@@ -144,16 +144,16 @@ public class MultipartReplyMessageFactoryTest {
     }
 
     /**
-     * Testing {@link MultipartReplyMessageFactory} for correct translation into POJO
+     * Testing {@link MultipartReplyMessageFactory} for correct translation into POJO.
      */
     @Test
-    public void testMultipartReplyAggregateBody(){
-        ByteBuf bb = BufferHelper.buildBuffer("00 02 00 01 00 00 00 00 "+
-                                              "FF 01 01 01 01 01 01 01 "+//packetCount
-                                              "0F 01 01 01 01 01 01 01 "+//byteCount
-                                              "00 00 00 08 "+//flowCount
-                                              "00 00 00 00"//pad
-                                              );
+    public void testMultipartReplyAggregateBody() {
+        ByteBuf bb = BufferHelper.buildBuffer("00 02 00 01 00 00 00 00 "
+                                            + "FF 01 01 01 01 01 01 01 " //packetCount
+                                            + "0F 01 01 01 01 01 01 01 " //byteCount
+                                            + "00 00 00 08 " //flowCount
+                                            + "00 00 00 00" //pad
+                                            );
 
         MultipartReplyMessage builtByFactory = BufferHelper.deserialize(multipartFactory, bb);
 
@@ -174,17 +174,17 @@ public class MultipartReplyMessageFactoryTest {
     }
 
     /**
-     * Testing {@link MultipartReplyMessageFactory} for correct translation into POJO
+     * Testing {@link MultipartReplyMessageFactory} for correct translation into POJO.
      */
     @Test
-    public void testMultipartReplyTableBody(){
-        ByteBuf bb = BufferHelper.buildBuffer("00 03 00 01 00 00 00 00 "+
-                                              "08 "+//tableId
-                                              "00 00 00 "+//pad
-                                              "00 00 00 10 "+//activeCount
-                                              "FF 01 01 01 01 01 01 01 "+//lookupCount
-                                              "AF 01 01 01 01 01 01 01"//matchedCount
-                                              );
+    public void testMultipartReplyTableBody() {
+        ByteBuf bb = BufferHelper.buildBuffer("00 03 00 01 00 00 00 00 "
+                                            + "08 " //tableId
+                                            + "00 00 00 " //pad
+                                            + "00 00 00 10 " //activeCount
+                                            + "FF 01 01 01 01 01 01 01 " //lookupCount
+                                            + "AF 01 01 01 01 01 01 01"//matchedCount
+                                            );
 
         MultipartReplyMessage builtByFactory = BufferHelper.deserialize(multipartFactory, bb);
 
@@ -205,28 +205,28 @@ public class MultipartReplyMessageFactoryTest {
     }
 
     /**
-     * Testing {@link MultipartReplyMessageFactory} for correct translation into POJO
+     * Testing {@link MultipartReplyMessageFactory} for correct translation into POJO.
      */
     @Test
-    public void testMultipartReplyPortStatsBody(){
-        ByteBuf bb = BufferHelper.buildBuffer("00 04 00 01 00 00 00 00 "+
-                                              "00 00 00 FF "+//portNo
-                                              "00 00 00 00 "+//pad
-                                              "FF 01 01 01 01 01 01 01 "+//rxPackets
-                                              "FF 02 02 02 02 02 02 02 "+//txPackets
-                                              "FF 02 03 02 03 02 03 02 "+//rxBytes
-                                              "FF 02 03 02 03 02 03 02 "+//txBytes
-                                              "FF 02 03 02 03 02 03 02 "+//rxDropped
-                                              "FF 02 03 02 03 02 03 02 "+//txDropped
-                                              "FF 02 03 02 03 02 03 02 "+//rxErrors
-                                              "FF 02 03 02 03 02 03 02 "+//txErrors
-                                              "FF 02 03 02 03 02 03 02 "+//rxFrameErr
-                                              "FF 02 03 02 03 02 03 02 "+//rxOverErr
-                                              "FF 02 03 02 03 02 03 02 "+//rxCrcErr
-                                              "FF 02 03 02 03 02 03 02 "+//collisions
-                                              "00 00 00 02 "+//durationSec
-                                              "00 00 00 04"//durationNsec
-                                              );
+    public void testMultipartReplyPortStatsBody() {
+        ByteBuf bb = BufferHelper.buildBuffer("00 04 00 01 00 00 00 00 "
+                                            + "00 00 00 FF " //portNo
+                                            + "00 00 00 00 " //pad
+                                            + "FF 01 01 01 01 01 01 01 " //rxPackets
+                                            + "FF 02 02 02 02 02 02 02 " //txPackets
+                                            + "FF 02 03 02 03 02 03 02 " //rxBytes
+                                            + "FF 02 03 02 03 02 03 02 " //txBytes
+                                            + "FF 02 03 02 03 02 03 02 " //rxDropped
+                                            + "FF 02 03 02 03 02 03 02 " //txDropped
+                                            + "FF 02 03 02 03 02 03 02 " //rxErrors
+                                            + "FF 02 03 02 03 02 03 02 " //txErrors
+                                            + "FF 02 03 02 03 02 03 02 " //rxFrameErr
+                                            + "FF 02 03 02 03 02 03 02 " //rxOverErr
+                                            + "FF 02 03 02 03 02 03 02 " //rxCrcErr
+                                            + "FF 02 03 02 03 02 03 02 " //collisions
+                                            + "00 00 00 02 " //durationSec
+                                            + "00 00 00 04"//durationNsec
+                                            );
 
         MultipartReplyMessage builtByFactory = BufferHelper.deserialize(multipartFactory, bb);
 
@@ -277,19 +277,19 @@ public class MultipartReplyMessageFactoryTest {
     }
 
     /**
-     * Testing {@link MultipartReplyMessageFactory} for correct translation into POJO
+     * Testing {@link MultipartReplyMessageFactory} for correct translation into POJO.
      */
     @Test
-    public void testMultipartReplyQueueBody(){
-        ByteBuf bb = BufferHelper.buildBuffer("00 05 00 01 00 00 00 00 "+
-                                              "00 00 00 FF "+//portNo
-                                              "00 00 00 10 "+//queueId
-                                              "FF 02 03 02 03 02 03 02 "+//txBytes
-                                              "FF 02 02 02 02 02 02 02 "+//txPackets
-                                              "FF 02 03 02 03 02 03 02 "+//txErrors
-                                              "00 00 00 02 "+//durationSec
-                                              "00 00 00 04"//durationNsec
-                                              );
+    public void testMultipartReplyQueueBody() {
+        ByteBuf bb = BufferHelper.buildBuffer("00 05 00 01 00 00 00 00 "
+                                            + "00 00 00 FF " //portNo
+                                            + "00 00 00 10 " //queueId
+                                            + "FF 02 03 02 03 02 03 02 " //txBytes
+                                            + "FF 02 02 02 02 02 02 02 " //txPackets
+                                            + "FF 02 03 02 03 02 03 02 " //txErrors
+                                            + "00 00 00 02 " //durationSec
+                                            + "00 00 00 04"//durationNsec
+                                            );
 
         MultipartReplyMessage builtByFactory = BufferHelper.deserialize(multipartFactory, bb);
 
@@ -314,38 +314,38 @@ public class MultipartReplyMessageFactoryTest {
     }
 
     /**
-     * Testing {@link MultipartReplyMessageFactory} for correct translation into POJO
+     * Testing {@link MultipartReplyMessageFactory} for correct translation into POJO.
      */
     @Test
-    public void testMultipartReplyGroupBody(){
-        ByteBuf bb = BufferHelper.buildBuffer("00 06 00 01 00 00 00 00 "+
-                                              "00 48 "+//length
-                                              "00 00 "+//pad1
-                                              "00 00 00 10 "+//groupId
-                                              "00 00 00 12 "+//refCount
-                                              "00 00 00 00 "+//pad2
-                                              "FF 01 01 01 01 01 01 01 "+//packetCount
-                                              "FF 01 01 01 01 01 01 01 "+//byteCount
-                                              "00 00 00 08 "+//durationSec
-                                              "00 00 00 09 "+//durationNsec
-                                              "FF 01 01 01 01 01 01 01 "+//packetCountBucket
-                                              "FF 01 01 01 01 01 01 01 "+//byteCountBucket
-                                              "FF 02 02 02 02 02 02 02 "+//packetCountBucket_2
-                                              "FF 02 02 02 02 02 02 02 "+//byteCountBucket_2
-                                              "00 48 "+//length_2
-                                              "00 00 "+//pad1.2
-                                              "00 00 00 10 "+//groupId_2
-                                              "00 00 00 12 "+//refCount_2
-                                              "00 00 00 00 "+//pad2.2
-                                              "FF 01 01 01 01 01 01 01 "+//packetCount_2
-                                              "FF 01 01 01 01 01 01 01 "+//byteCount_2
-                                              "00 00 00 08 "+//durationSec_2
-                                              "00 00 00 09 "+//durationNsec_2
-                                              "FF 01 01 01 01 01 01 01 "+//packetCountBucket_1.2
-                                              "FF 01 01 01 01 01 01 01 "+//byteCountBucket_1.2
-                                              "FF 02 02 02 02 02 02 02 "+//packetCountBucket_2.2
-                                              "FF 02 02 02 02 02 02 02"//byteCountBucket_2.2
-                                              );
+    public void testMultipartReplyGroupBody() {
+        ByteBuf bb = BufferHelper.buildBuffer("00 06 00 01 00 00 00 00 "
+                                            + "00 48 " //length
+                                            + "00 00 " //pad1
+                                            + "00 00 00 10 " //groupId
+                                            + "00 00 00 12 " //refCount
+                                            + "00 00 00 00 " //pad2
+                                            + "FF 01 01 01 01 01 01 01 " //packetCount
+                                            + "FF 01 01 01 01 01 01 01 " //byteCount
+                                            + "00 00 00 08 " //durationSec
+                                            + "00 00 00 09 " //durationNsec
+                                            + "FF 01 01 01 01 01 01 01 " //packetCountBucket
+                                            + "FF 01 01 01 01 01 01 01 " //byteCountBucket
+                                            + "FF 02 02 02 02 02 02 02 " //packetCountBucket_2
+                                            + "FF 02 02 02 02 02 02 02 " //byteCountBucket_2
+                                            + "00 48 " //length_2
+                                            + "00 00 " //pad1.2
+                                            + "00 00 00 10 " //groupId_2
+                                            + "00 00 00 12 " //refCount_2
+                                            + "00 00 00 00 " //pad2.2
+                                            + "FF 01 01 01 01 01 01 01 " //packetCount_2
+                                            + "FF 01 01 01 01 01 01 01 " //byteCount_2
+                                            + "00 00 00 08 " //durationSec_2
+                                            + "00 00 00 09 " //durationNsec_2
+                                            + "FF 01 01 01 01 01 01 01 " //packetCountBucket_1.2
+                                            + "FF 01 01 01 01 01 01 01 " //byteCountBucket_1.2
+                                            + "FF 02 02 02 02 02 02 02 " //packetCountBucket_2.2
+                                            + "FF 02 02 02 02 02 02 02"//byteCountBucket_2.2
+                                            );
 
         MultipartReplyMessage builtByFactory = BufferHelper.deserialize(multipartFactory, bb);
 
@@ -402,26 +402,26 @@ public class MultipartReplyMessageFactoryTest {
     }
 
     /**
-     * Testing {@link MultipartReplyMessageFactory} for correct translation into POJO
+     * Testing {@link MultipartReplyMessageFactory} for correct translation into POJO.
      */
     @Test
-    public void testMultipartReplyMeterBody(){
-        ByteBuf bb = BufferHelper.buildBuffer("00 09 00 01 00 00 00 00 "+
-                                              "00 00 00 09 "+//meterId
-                                              "00 58 "+//len
-                                              "00 00 00 00 00 00 "+//pad
-                                              "00 00 00 07 "+//flowCount
-                                              "FF 01 01 01 01 01 01 01 "+//packetInCount
-                                              "FF 01 01 01 01 01 01 01 "+//byteInCount
-                                              "00 00 00 05 "+//durationSec
-                                              "00 00 00 05 "+//durationNsec
-                                              "FF 01 01 01 01 01 01 01 "+//packetBandCount_01
-                                              "FF 01 01 01 01 01 01 01 "+//byteBandCount_01
-                                              "FF 02 02 02 02 02 02 02 "+//packetBandCount_02
-                                              "FF 02 02 02 02 02 02 02 "+//byteBandCount_02
-                                              "FF 03 03 03 03 03 03 03 "+//packetBandCount_03
-                                              "FF 03 03 03 03 03 03 03"//byteBandCount_03
-                                              );
+    public void testMultipartReplyMeterBody() {
+        ByteBuf bb = BufferHelper.buildBuffer("00 09 00 01 00 00 00 00 "
+                                            + "00 00 00 09 " //meterId
+                                            + "00 58 " //len
+                                            + "00 00 00 00 00 00 " //pad
+                                            + "00 00 00 07 " //flowCount
+                                            + "FF 01 01 01 01 01 01 01 " //packetInCount
+                                            + "FF 01 01 01 01 01 01 01 " //byteInCount
+                                            + "00 00 00 05 " //durationSec
+                                            + "00 00 00 05 " //durationNsec
+                                            + "FF 01 01 01 01 01 01 01 " //packetBandCount_01
+                                            + "FF 01 01 01 01 01 01 01 " //byteBandCount_01
+                                            + "FF 02 02 02 02 02 02 02 " //packetBandCount_02
+                                            + "FF 02 02 02 02 02 02 02 " //byteBandCount_02
+                                            + "FF 03 03 03 03 03 03 03 " //packetBandCount_03
+                                            + "FF 03 03 03 03 03 03 03" //byteBandCount_03
+                                            );
 
         MultipartReplyMessage builtByFactory = BufferHelper.deserialize(multipartFactory, bb);
 
@@ -465,40 +465,40 @@ public class MultipartReplyMessageFactoryTest {
     }
 
     /**
-     * Testing {@link MultipartReplyMessageFactory} for correct translation into POJO
+     * Testing {@link MultipartReplyMessageFactory} for correct translation into POJO.
      */
     @Test
-    public void testMultipartReplyMeterBodyMulti(){
-        ByteBuf bb = BufferHelper.buildBuffer("00 09 00 01 00 00 00 00 "+
-                                              "00 00 00 09 "+//meterId_0
-                                              "00 58 "+//len_0
-                                              "00 00 00 00 00 00 "+//pad_0
-                                              "00 00 00 07 "+//flowCount_0
-                                              "FF 01 01 01 01 01 01 01 "+//packetInCount_0
-                                              "FF 01 01 01 01 01 01 01 "+//byteInCount_0
-                                              "00 00 00 05 "+//durationSec_0
-                                              "00 00 00 05 "+//durationNsec_0
-                                              "FF 01 01 01 01 01 01 01 "+//packetBandCount_01
-                                              "FF 01 01 01 01 01 01 01 "+//byteBandCount_01
-                                              "FF 02 02 02 02 02 02 02 "+//packetBandCount_02
-                                              "FF 02 02 02 02 02 02 02 "+//byteBandCount_02
-                                              "FF 03 03 03 03 03 03 03 "+//packetBandCount_03
-                                              "FF 03 03 03 03 03 03 03 "+//byteBandCount_03
-                                              "00 00 00 08 "+//meterId_1
-                                              "00 58 "+//len_1
-                                              "00 00 00 00 00 00 "+//pad_1
-                                              "00 00 00 07 "+//flowCount_1
-                                              "FF 01 01 01 01 01 01 01 "+//packetInCount_1
-                                              "FF 01 01 01 01 01 01 01 "+//byteInCount_1
-                                              "00 00 00 05 "+//durationSec_1
-                                              "00 00 00 05 "+//durationNsec_1
-                                              "FF 01 01 01 01 01 01 01 "+//packetBandCount_11
-                                              "FF 01 01 01 01 01 01 01 "+//byteBandCount_11
-                                              "FF 02 02 02 02 02 02 02 "+//packetBandCount_12
-                                              "FF 02 02 02 02 02 02 02 "+//byteBandCount_12
-                                              "FF 03 03 03 03 03 03 03 "+//packetBandCount_13
-                                              "FF 03 03 03 03 03 03 03"//byteBandCount_13
-                                              );
+    public void testMultipartReplyMeterBodyMulti() {
+        ByteBuf bb = BufferHelper.buildBuffer("00 09 00 01 00 00 00 00 "
+                                            + "00 00 00 09 " //meterId_0
+                                            + "00 58 " //len_0
+                                            + "00 00 00 00 00 00 " //pad_0
+                                            + "00 00 00 07 " //flowCount_0
+                                            + "FF 01 01 01 01 01 01 01 " //packetInCount_0
+                                            + "FF 01 01 01 01 01 01 01 " //byteInCount_0
+                                            + "00 00 00 05 " //durationSec_0
+                                            + "00 00 00 05 " //durationNsec_0
+                                            + "FF 01 01 01 01 01 01 01 " //packetBandCount_01
+                                            + "FF 01 01 01 01 01 01 01 " //byteBandCount_01
+                                            + "FF 02 02 02 02 02 02 02 " //packetBandCount_02
+                                            + "FF 02 02 02 02 02 02 02 " //byteBandCount_02
+                                            + "FF 03 03 03 03 03 03 03 " //packetBandCount_03
+                                            + "FF 03 03 03 03 03 03 03 " //byteBandCount_03
+                                            + "00 00 00 08 " //meterId_1
+                                            + "00 58 " //len_1
+                                            + "00 00 00 00 00 00 " //pad_1
+                                            + "00 00 00 07 " //flowCount_1
+                                            + "FF 01 01 01 01 01 01 01 " //packetInCount_1
+                                            + "FF 01 01 01 01 01 01 01 " //byteInCount_1
+                                            + "00 00 00 05 " //durationSec_1
+                                            + "00 00 00 05 " //durationNsec_1
+                                            + "FF 01 01 01 01 01 01 01 " //packetBandCount_11
+                                            + "FF 01 01 01 01 01 01 01 " //byteBandCount_11
+                                            + "FF 02 02 02 02 02 02 02 " //packetBandCount_12
+                                            + "FF 02 02 02 02 02 02 02 " //byteBandCount_12
+                                            + "FF 03 03 03 03 03 03 03 " //packetBandCount_13
+                                            + "FF 03 03 03 03 03 03 03"//byteBandCount_13
+                                           );
 
         MultipartReplyMessage builtByFactory = BufferHelper.deserialize(multipartFactory, bb);
 
@@ -575,45 +575,48 @@ public class MultipartReplyMessageFactoryTest {
     }
 
     /**
-     * Testing {@link MultipartReplyMessageFactory} for correct translation into POJO
+     * Testing {@link MultipartReplyMessageFactory} for correct translation into POJO.
      */
     @Test
-    public void testMultipartReplyMeterConfigBody(){
-        ByteBuf bb = BufferHelper.buildBuffer("00 0A 00 01 00 00 00 00 "+
-                                              "00 28 "+//len
-                                              "00 0A "+//flags
-                                              "00 00 00 09 "+//meterId
-                                              "00 01 "+//meterBandDrop.type
-                                              "00 10 "+//meterBandDrop.len
-                                              "00 00 00 11 "+//meterBandDrop.rate
-                                              "00 00 00 20 "+//meterBandDrop.burstSize
-                                              "00 00 00 00 "+//meterBandDrop.pad
-                                              "00 02 "+//meterBandDscp.type
-                                              "00 10 "+//meterBandDscp.len
-                                              "00 00 00 11 "+//meterBandDscp.rate
-                                              "00 00 00 20 "+//meterBandDscp.burstSize
-                                              "04 "+//meterBandDscp.precLevel
-                                              "00 00 00");//meterBandDscp.pad
+    public void testMultipartReplyMeterConfigBody() {
+        ByteBuf bb = BufferHelper.buildBuffer("00 0A 00 01 00 00 00 00 "
+                                            + "00 28 " //len
+                                            + "00 0A " //flags
+                                            + "00 00 00 09 " //meterId
+                                            + "00 01 " //meterBandDrop.type
+                                            + "00 10 " //meterBandDrop.len
+                                            + "00 00 00 11 " //meterBandDrop.rate
+                                            + "00 00 00 20 " //meterBandDrop.burstSize
+                                            + "00 00 00 00 " //meterBandDrop.pad
+                                            + "00 02 " //meterBandDscp.type
+                                            + "00 10 " //meterBandDscp.len
+                                            + "00 00 00 11 " //meterBandDscp.rate
+                                            + "00 00 00 20 " //meterBandDscp.burstSize
+                                            + "04 " //meterBandDscp.precLevel
+                                            + "00 00 00");//meterBandDscp.pad
 
         MultipartReplyMessage builtByFactory = BufferHelper.deserialize(multipartFactory, bb);
 
         BufferHelper.checkHeaderV13(builtByFactory);
         Assert.assertEquals("Wrong type", 10, builtByFactory.getType().getIntValue());
         Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().isOFPMPFREQMORE());
-        MultipartReplyMeterConfigCase messageCase = (MultipartReplyMeterConfigCase) builtByFactory.getMultipartReplyBody();
+        MultipartReplyMeterConfigCase messageCase =
+                (MultipartReplyMeterConfigCase) builtByFactory.getMultipartReplyBody();
         MultipartReplyMeterConfig message = messageCase.getMultipartReplyMeterConfig();
         Assert.assertEquals("Wrong flags", new MeterFlags(false, false, true, true),
                              message.getMeterConfig().get(0).getFlags());
         Assert.assertEquals("Wrong meterId", 9,
                              message.getMeterConfig().get(0).getMeterId().getValue().intValue());
 
-        MeterBandDropCase dropCase = (MeterBandDropCase) message.getMeterConfig().get(0).getBands().get(0).getMeterBand();
+        MeterBandDropCase dropCase =
+                (MeterBandDropCase) message.getMeterConfig().get(0).getBands().get(0).getMeterBand();
         MeterBandDrop meterBandDrop = dropCase.getMeterBandDrop();
         Assert.assertEquals("Wrong meterBandDrop.type", 1, meterBandDrop.getType().getIntValue());
         Assert.assertEquals("Wrong meterBandDrop.rate", 17, meterBandDrop.getRate().intValue());
         Assert.assertEquals("Wrong meterBandDrop.burstSize", 32, meterBandDrop.getBurstSize().intValue());
 
-        MeterBandDscpRemarkCase dscpCase = (MeterBandDscpRemarkCase) message.getMeterConfig().get(0).getBands().get(1).getMeterBand();
+        MeterBandDscpRemarkCase dscpCase =
+                (MeterBandDscpRemarkCase) message.getMeterConfig().get(0).getBands().get(1).getMeterBand();
         MeterBandDscpRemark meterBandDscp = dscpCase.getMeterBandDscpRemark();
         Assert.assertEquals("Wrong meterBandDscp.type", 2, meterBandDscp.getType().getIntValue());
         Assert.assertEquals("Wrong meterBandDscp.rate", 17, meterBandDscp.getRate().intValue());
@@ -622,56 +625,58 @@ public class MultipartReplyMessageFactoryTest {
     }
 
     /**
-     * Testing {@link MultipartReplyMessageFactory} for correct translation into POJO
+     * Testing {@link MultipartReplyMessageFactory} for correct translation into POJO.
      */
     @Test
-    public void testMultipartReplyMeterConfigBodyMulti(){
-        ByteBuf bb = BufferHelper.buildBuffer("00 0A 00 01 00 00 00 00 "+
-                                              "00 28 "+//len
-                                              "00 06 "+//flags
-                                              "00 00 00 09 "+//meterId
-                                              "00 01 "+//meterBandDrop.type
-                                              "00 10 "+//meterBandDrop.len
-                                              "00 00 00 11 "+//meterBandDrop.rate
-                                              "00 00 00 20 "+//meterBandDrop.burstSize
-                                              "00 00 00 00 "+//meterBandDrop.pad
-                                              "00 02 "+//meterBandDscp.type
-                                              "00 10 "+//meterBandDscp.len
-                                              "00 00 00 11 "+//meterBandDscp.rate
-                                              "00 00 00 20 "+//meterBandDscp.burstSize
-                                              "04 "+//meterBandDscp.precLevel
-                                              "00 00 00 "+//meterBandDscp.pad
-
-                                              "00 18 "+//len01
-                                              "00 03 "+//flags01
-                                              "00 00 00 07 "+//meterId01
-                                              "00 02 "+//meterBandDscp01.type
-                                              "00 10 "+//meterBandDscp01.len
-                                              "00 00 00 11 "+//meterBandDscp01.rate
-                                              "00 00 00 20 "+//meterBandDscp01.burstSize
-                                              "04 "+//meterBandDscp01.precLevel
-                                              "00 00 00"//meterBandDscp01.pad
-                                              );
+    public void testMultipartReplyMeterConfigBodyMulti() {
+        ByteBuf bb = BufferHelper.buildBuffer("00 0A 00 01 00 00 00 00 "
+                                            + "00 28 " //len
+                                            + "00 06 " //flags
+                                            + "00 00 00 09 " //meterId
+                                            + "00 01 " //meterBandDrop.type
+                                            + "00 10 " //meterBandDrop.len
+                                            + "00 00 00 11 " //meterBandDrop.rate
+                                            + "00 00 00 20 " //meterBandDrop.burstSize
+                                            + "00 00 00 00 " //meterBandDrop.pad
+                                            + "00 02 " //meterBandDscp.type
+                                            + "00 10 " //meterBandDscp.len
+                                            + "00 00 00 11 " //meterBandDscp.rate
+                                            + "00 00 00 20 " //meterBandDscp.burstSize
+                                            + "04 " //meterBandDscp.precLevel
+                                            + "00 00 00 " //meterBandDscp.pad
+                                            + "00 18 " //len01
+                                            + "00 03 " //flags01
+                                            + "00 00 00 07 " //meterId01
+                                            + "00 02 " //meterBandDscp01.type
+                                            + "00 10 " //meterBandDscp01.len
+                                            + "00 00 00 11 " //meterBandDscp01.rate
+                                            + "00 00 00 20 " //meterBandDscp01.burstSize
+                                            + "04 " //meterBandDscp01.precLevel
+                                            + "00 00 00"//meterBandDscp01.pad
+                                            );
 
         MultipartReplyMessage builtByFactory = BufferHelper.deserialize(multipartFactory, bb);
 
         BufferHelper.checkHeaderV13(builtByFactory);
         Assert.assertEquals("Wrong type", 10, builtByFactory.getType().getIntValue());
         Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().isOFPMPFREQMORE());
-        MultipartReplyMeterConfigCase messageCase = (MultipartReplyMeterConfigCase) builtByFactory.getMultipartReplyBody();
+        MultipartReplyMeterConfigCase messageCase =
+                (MultipartReplyMeterConfigCase) builtByFactory.getMultipartReplyBody();
         MultipartReplyMeterConfig message = messageCase.getMultipartReplyMeterConfig();
         Assert.assertEquals("Wrong flags", new MeterFlags(true, false, true, false),
                              message.getMeterConfig().get(0).getFlags());
         Assert.assertEquals("Wrong meterId", 9,
                              message.getMeterConfig().get(0).getMeterId().getValue().intValue());
 
-        MeterBandDropCase dropCase = (MeterBandDropCase) message.getMeterConfig().get(0).getBands().get(0).getMeterBand();
+        MeterBandDropCase dropCase =
+                (MeterBandDropCase) message.getMeterConfig().get(0).getBands().get(0).getMeterBand();
         MeterBandDrop meterBandDrop = dropCase.getMeterBandDrop();
         Assert.assertEquals("Wrong meterBandDrop.type", 1, meterBandDrop.getType().getIntValue());
         Assert.assertEquals("Wrong meterBandDrop.rate", 17, meterBandDrop.getRate().intValue());
         Assert.assertEquals("Wrong meterBandDrop.burstSize", 32, meterBandDrop.getBurstSize().intValue());
 
-        MeterBandDscpRemarkCase dscpCase = (MeterBandDscpRemarkCase) message.getMeterConfig().get(0).getBands().get(1).getMeterBand();
+        MeterBandDscpRemarkCase dscpCase =
+                (MeterBandDscpRemarkCase) message.getMeterConfig().get(0).getBands().get(1).getMeterBand();
         MeterBandDscpRemark meterBandDscp = dscpCase.getMeterBandDscpRemark();
         Assert.assertEquals("Wrong meterBandDscp.type", 2, meterBandDscp.getType().getIntValue());
         Assert.assertEquals("Wrong meterBandDscp.rate", 17, meterBandDscp.getRate().intValue());
@@ -684,7 +689,8 @@ public class MultipartReplyMessageFactoryTest {
         Assert.assertEquals("Wrong meterId01", 7,
                              message.getMeterConfig().get(1).getMeterId().getValue().intValue());
 
-        MeterBandDscpRemarkCase dscpCase01 = (MeterBandDscpRemarkCase) message.getMeterConfig().get(1).getBands().get(0).getMeterBand();
+        MeterBandDscpRemarkCase dscpCase01 =
+                (MeterBandDscpRemarkCase) message.getMeterConfig().get(1).getBands().get(0).getMeterBand();
         MeterBandDscpRemark meterBandDscp01 = dscpCase01.getMeterBandDscpRemark();
         Assert.assertEquals("Wrong meterBandDscp01.type", 2, meterBandDscp01.getType().getIntValue());
         Assert.assertEquals("Wrong meterBandDscp01.rate", 17, meterBandDscp01.getRate().intValue());
@@ -694,33 +700,33 @@ public class MultipartReplyMessageFactoryTest {
     }
 
     /**
-     * Testing {@link MultipartReplyMessageFactory} for correct translation into POJO
-     * Test covers bodies of actions Output, Copy TTL Out, Copy TTL In
+     * Testing {@link MultipartReplyMessageFactory} for correct translation into POJO.
+     * Test covers bodies of actions Output, Copy TTL Out, Copy TTL In.
      */
     @Test
-    public void testMultipartReplyGroupDescBody01(){
-        ByteBuf bb = BufferHelper.buildBuffer("00 07 00 01 00 00 00 00 "+
-                                              "00 38 "+//len
-                                              "01 "+//type
-                                              "00 "+//pad
-                                              "00 00 00 08 "+//groupId
-                                              "00 30 "+//bucketLen
-                                              "00 06 "+//bucketWeight
-                                              "00 00 00 05 "+//bucketWatchPort
-                                              "00 00 00 04 "+//bucketWatchGroup
-                                              "00 00 00 00 "+//bucketPad
-                                              "00 00 "+//outputType
-                                              "00 10 "+//outputLen
-                                              "00 00 10 FF "+//outputPort
-                                              "FF FF "+//outputMaxLen
-                                              "00 00 00 00 00 00 "+//outputPad
-                                              "00 0B "+//copyTTLOutType
-                                              "00 08 "+//copyTTLOutLen
-                                              "00 00 00 00 "+//copyTTLOutPad
-                                              "00 0C "+//copyTTLIntType
-                                              "00 08 "+//copyTTLIntLen
-                                              "00 00 00 00"//copyTTLInPad
-                                              );
+    public void testMultipartReplyGroupDescBody01() {
+        ByteBuf bb = BufferHelper.buildBuffer("00 07 00 01 00 00 00 00 "
+                                            + "00 38 " //len
+                                            + "01 " //type
+                                            + "00 " //pad
+                                            + "00 00 00 08 " //groupId
+                                            + "00 30 " //bucketLen
+                                            + "00 06 " //bucketWeight
+                                            + "00 00 00 05 " //bucketWatchPort
+                                            + "00 00 00 04 " //bucketWatchGroup
+                                            + "00 00 00 00 " //bucketPad
+                                            + "00 00 " //outputType
+                                            + "00 10 " //outputLen
+                                            + "00 00 10 FF " //outputPort
+                                            + "FF FF " //outputMaxLen
+                                            + "00 00 00 00 00 00 " //outputPad
+                                            + "00 0B " //copyTTLOutType
+                                            + "00 08 " //copyTTLOutLen
+                                            + "00 00 00 00 " //copyTTLOutPad
+                                            + "00 0C " //copyTTLIntType
+                                            + "00 08 " //copyTTLIntLen
+                                            + "00 00 00 00"//copyTTLInPad
+                                            );
         MultipartReplyMessage builtByFactory = BufferHelper.deserialize(multipartFactory, bb);
 
         BufferHelper.checkHeaderV13(builtByFactory);
@@ -735,8 +741,7 @@ public class MultipartReplyMessageFactoryTest {
         Assert.assertEquals("Wrong bucketWeight", 6,
                 message.getGroupDesc().get(0).getBucketsList().get(0).getWeight().intValue());
         Assert.assertEquals("Wrong bucketWatchPort", 5,
-                message.getGroupDesc().get(0).getBucketsList().get(0).getWatchPort().
-                                                                        getValue().intValue());
+                message.getGroupDesc().get(0).getBucketsList().get(0).getWatchPort().getValue().intValue());
         Assert.assertEquals("Wrong bucketWatchGroup", 4,
                 message.getGroupDesc().get(0).getBucketsList().get(0).getWatchGroup().intValue());
 
@@ -759,41 +764,41 @@ public class MultipartReplyMessageFactoryTest {
     }
 
     /**
-     * Testing {@link MultipartReplyMessageFactory} for correct translation into POJO
-     * Test covers bodies of actions Set MPLS TTL , Dec MPLS TTL, Push VLAN. Push MPLS, Push PBB
+     * Testing {@link MultipartReplyMessageFactory} for correct translation into POJO.
+     * Test covers bodies of actions Set MPLS TTL , Dec MPLS TTL, Push VLAN. Push MPLS, Push PBB.
      */
     @Test
-    public void testMultipartReplyGroupDescBody02(){
-        ByteBuf bb = BufferHelper.buildBuffer("00 07 00 01 00 00 00 00 "+
-                                              "00 40 "+//len
-                                              "01 "+//type
-                                              "00 "+//pad
-                                              "00 00 00 08 "+//groupId
-                                              "00 38 "+//bucketLen
-                                              "00 06 "+//bucketWeight
-                                              "00 00 00 05 "+//bucketWatchPort
-                                              "00 00 00 04 "+//bucketWatchGroup
-                                              "00 00 00 00 "+//bucketPad
-                                              "00 0F "+//setMplsTtlType
-                                              "00 08 "+//setMplsTtlLen
-                                              "09 "+//setMplsTtlMPLS_TTL
-                                              "00 00 00 "+//setMplsTtlPad
-                                              "00 10 "+//decMplsTtlType
-                                              "00 08 "+//decMplsTtlLen
-                                              "00 00 00 00 "+//decMplsTtlPad
-                                              "00 11 "+//pushVlanType
-                                              "00 08 "+//pushVlanLen
-                                              "00 20 "+//pushVlanEthertype
-                                              "00 00 "+//pushVlanPad
-                                              "00 13 "+//pushMplsType
-                                              "00 08 "+//pushMplsLen
-                                              "00 FF "+//pushMplsEthertype
-                                              "00 00 "+//pushMplsPad
-                                              "00 1A "+//pushPbbType
-                                              "00 08 "+//pushPbbLen
-                                              "0F FF "+//pushPbbEthertype
-                                              "00 00"//pushPbbPad
-                                              );
+    public void testMultipartReplyGroupDescBody02() {
+        ByteBuf bb = BufferHelper.buildBuffer("00 07 00 01 00 00 00 00 "
+                                            + "00 40 " //len
+                                            + "01 " //type
+                                            + "00 " //pad
+                                            + "00 00 00 08 " //groupId
+                                            + "00 38 " //bucketLen
+                                            + "00 06 " //bucketWeight
+                                            + "00 00 00 05 " //bucketWatchPort
+                                            + "00 00 00 04 " //bucketWatchGroup
+                                            + "00 00 00 00 " //bucketPad
+                                            + "00 0F " //setMplsTtlType
+                                            + "00 08 " //setMplsTtlLen
+                                            + "09 " //setMplsTtlMPLS_TTL
+                                            + "00 00 00 " //setMplsTtlPad
+                                            + "00 10 " //decMplsTtlType
+                                            + "00 08 " //decMplsTtlLen
+                                            + "00 00 00 00 " //decMplsTtlPad
+                                            + "00 11 " //pushVlanType
+                                            + "00 08 " //pushVlanLen
+                                            + "00 20 " //pushVlanEthertype
+                                            + "00 00 " //pushVlanPad
+                                            + "00 13 " //pushMplsType
+                                            + "00 08 " //pushMplsLen
+                                            + "00 FF " //pushMplsEthertype
+                                            + "00 00 " //pushMplsPad
+                                            + "00 1A " //pushPbbType
+                                            + "00 08 " //pushPbbLen
+                                            + "0F FF " //pushPbbEthertype
+                                            + "00 00"//pushPbbPad
+                                            );
 
         MultipartReplyMessage builtByFactory = BufferHelper.deserialize(multipartFactory, bb);
 
@@ -837,41 +842,41 @@ public class MultipartReplyMessageFactoryTest {
     }
 
     /**
-     * Testing {@link MultipartReplyMessageFactory} for correct translation into POJO
-     * Test covers bodies of actions Pop VLAN, Pop PBB, Pop MPLS, Group, Dec NW TTL
+     * Testing {@link MultipartReplyMessageFactory} for correct translation into POJO.
+     * Test covers bodies of actions Pop VLAN, Pop PBB, Pop MPLS, Group, Dec NW TTL.
      */
     @Test
-    public void testMultipartReplyGroupDescBody03(){
-        ByteBuf bb = BufferHelper.buildBuffer("00 07 00 01 00 00 00 00 "+
-                                              "00 48 "+//len
-                                              "01 "+//type
-                                              "00 "+//pad
-                                              "00 00 00 08 "+//groupId
-                                              "00 40 "+//bucketLen
-                                              "00 06 "+//bucketWeight
-                                              "00 00 00 05 "+//bucketWatchPort
-                                              "00 00 00 04 "+//bucketWatchGroup
-                                              "00 00 00 00 "+//bucketPad
-                                              "00 12 "+//popVlanType
-                                              "00 08 "+//popVlanLen
-                                              "00 00 00 00 "+//popVlanPad
-                                              "00 1B "+//popPbbType
-                                              "00 08 "+//popPbbLen
-                                              "00 00 00 00 "+//popPbbPad
-                                              "00 14 "+//popMplsType
-                                              "00 08 "+//popMplsLen
-                                              "00 CF "+//popMplsEthertype
-                                              "00 00 "+//popMplsPad
-                                              "00 15 "+//setQueueType
-                                              "00 08 "+//setQueueLen
-                                              "00 CF 00 00 "+//setQueueQueueId
-                                              "00 16 "+//groupType
-                                              "00 08 "+//groupLen
-                                              "00 CF 00 00 "+//groupGroupId
-                                              "00 18 "+//decNwTtlType
-                                              "00 08 "+//decNwTtlLen
-                                              "00 00 00 00"//decNwTtlPad
-                                              );
+    public void testMultipartReplyGroupDescBody03() {
+        ByteBuf bb = BufferHelper.buildBuffer("00 07 00 01 00 00 00 00 "
+                                            + "00 48 " //len
+                                            + "01 " //type
+                                            + "00 " //pad
+                                            + "00 00 00 08 " //groupId
+                                            + "00 40 " //bucketLen
+                                            + "00 06 " //bucketWeight
+                                            + "00 00 00 05 " //bucketWatchPort
+                                            + "00 00 00 04 " //bucketWatchGroup
+                                            + "00 00 00 00 " //bucketPad
+                                            + "00 12 " //popVlanType
+                                            + "00 08 " //popVlanLen
+                                            + "00 00 00 00 " //popVlanPad
+                                            + "00 1B " //popPbbType
+                                            + "00 08 " //popPbbLen
+                                            + "00 00 00 00 " //popPbbPad
+                                            + "00 14 " //popMplsType
+                                            + "00 08 " //popMplsLen
+                                            + "00 CF " //popMplsEthertype
+                                            + "00 00 " //popMplsPad
+                                            + "00 15 " //setQueueType
+                                            + "00 08 " //setQueueLen
+                                            + "00 CF 00 00 " //setQueueQueueId
+                                            + "00 16 " //groupType
+                                            + "00 08 " //groupLen
+                                            + "00 CF 00 00 " //groupGroupId
+                                            + "00 18 " //decNwTtlType
+                                            + "00 08 " //decNwTtlLen
+                                            + "00 00 00 00"//decNwTtlPad
+                                            );
 
         MultipartReplyMessage builtByFactory = BufferHelper.deserialize(multipartFactory, bb);
 
@@ -912,33 +917,32 @@ public class MultipartReplyMessageFactoryTest {
     }
 
     /**
-     * Testing {@link MultipartReplyMessageFactory} for correct translation into POJO
-     * Test covers bodies of actions NW TTL, Experimenter
+     * Testing {@link MultipartReplyMessageFactory} for correct translation into POJO.
+     * Test covers bodies of actions NW TTL, Experimenter.
      */
     @Test
-    public void testMultipartReplyGroupDescBody04(){
-        ByteBuf bb = BufferHelper.buildBuffer("00 07 00 01 00 00 00 00 "+
-                                              "00 30 "+//len
-                                              "01 "+//type
-                                              "00 "+//pad
-                                              "00 00 00 08 "+//groupId
-                                              "00 28 "+//bucketLen
-                                              "00 06 "+//bucketWeight
-                                              "00 00 00 05 "+//bucketWatchPort
-                                              "00 00 00 04 "+//bucketWatchGroup
-                                              "00 00 00 00 "+//bucketPad
-                                              "00 17 "+//nwTTlType
-                                              "00 08 "+//nwTTlLen
-                                              "0E "+//nwTTlnwTTL
-                                              "00 00 00 "+//nwTTlPad
-                                              "00 19 "+//setFieldType
-                                              "00 10 "+//setFieldLen
-                                              "80 00 "+//setFieldOXMClass
-                                              "00 "+//setFieldOXMField
-                                              "04 "+//setFieldOXMLength
-                                              "00 00 00 FF "+ //setFieldPort
-                                              "00 00 00 00"
-                );
+    public void testMultipartReplyGroupDescBody04() {
+        ByteBuf bb = BufferHelper.buildBuffer("00 07 00 01 00 00 00 00 "
+                                            + "00 30 " //len
+                                            + "01 " //type
+                                            + "00 " //pad
+                                            + "00 00 00 08 " //groupId
+                                            + "00 28 " //bucketLen
+                                            + "00 06 " //bucketWeight
+                                            + "00 00 00 05 " //bucketWatchPort
+                                            + "00 00 00 04 " //bucketWatchGroup
+                                            + "00 00 00 00 " //bucketPad
+                                            + "00 17 " //nwTTlType
+                                            + "00 08 " //nwTTlLen
+                                            + "0E " //nwTTlnwTTL
+                                            + "00 00 00 " //nwTTlPad
+                                            + "00 19 " //setFieldType
+                                            + "00 10 " //setFieldLen
+                                            + "80 00 " //setFieldOXMClass
+                                            + "00 " //setFieldOXMField
+                                            + "04 " //setFieldOXMLength
+                                            + "00 00 00 FF " //setFieldPort
+                                            + "00 00 00 00");
 
         MultipartReplyMessage builtByFactory = BufferHelper.deserialize(multipartFactory, bb);
 
@@ -954,8 +958,7 @@ public class MultipartReplyMessageFactoryTest {
         Assert.assertEquals("Wrong bucketWeight", 6,
                 message.getGroupDesc().get(0).getBucketsList().get(0).getWeight().intValue());
         Assert.assertEquals("Wrong bucketWatchPort", 5,
-                message.getGroupDesc().get(0).getBucketsList().get(0).getWatchPort().
-                                                                        getValue().intValue());
+                message.getGroupDesc().get(0).getBucketsList().get(0).getWatchPort().getValue().intValue());
         Assert.assertEquals("Wrong bucketWatchGroup", 4,
                 message.getGroupDesc().get(0).getBucketsList().get(0).getWatchGroup().intValue());
 
index 43397a8e7fbfa04412ff3efa3f5d9d692f9c140a..726f0c303df4f4aadb62465be066cd81fef70325 100644 (file)
@@ -26,8 +26,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.aggregate._case.MultipartRequestAggregateBuilder;
 
 /**
- * @author giuseppex.petralia@intel.com
+ * Unit tests for MultipartRequestAggregateInputMessageFactory.
  *
+ * @author giuseppex.petralia@intel.com
  */
 public class MultipartRequestAggregateInputMessageFactoryTest {
 
@@ -55,7 +56,7 @@ public class MultipartRequestAggregateInputMessageFactoryTest {
     }
 
     private static MultipartRequestAggregateCase createRequestAggregate() {
-        MultipartRequestAggregateCaseBuilder caseBuilder = new MultipartRequestAggregateCaseBuilder();
+        final MultipartRequestAggregateCaseBuilder caseBuilder = new MultipartRequestAggregateCaseBuilder();
         MultipartRequestAggregateBuilder builder = new MultipartRequestAggregateBuilder();
         builder.setTableId((short) 8);
         builder.setOutPort(85L);
index 89aea312a32d6c3451307b76c97630574f40dbcf..55d59df915a03d0ef2c8b3c6d0ab143547c01a36 100644 (file)
@@ -25,8 +25,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.desc._case.MultipartRequestDescBuilder;
 
 /**
- * @author giuseppex.petralia@intel.com
+ * Unit tests for MultipartRequestDescInputMessageFactory.
  *
+ * @author giuseppex.petralia@intel.com
  */
 public class MultipartRequestDescInputMessageFactoryTest {
 
index d8f9d0a00469d12cb8e4025906cb0b17b24049d8..48fbc4cae65b09ce02929d4961e582b5456d018e 100644 (file)
@@ -26,8 +26,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.flow._case.MultipartRequestFlowBuilder;
 
 /**
- * @author giuseppex.petralia@intel.com
+ * Unit tests for MultipartRequestFlowInputMessageFactory.
  *
+ * @author giuseppex.petralia@intel.com
  */
 public class MultipartRequestFlowInputMessageFactoryTest {
 
@@ -55,7 +56,7 @@ public class MultipartRequestFlowInputMessageFactoryTest {
     }
 
     private static MultipartRequestFlowCase createRequestFlow() {
-        MultipartRequestFlowCaseBuilder caseBuilder = new MultipartRequestFlowCaseBuilder();
+        final MultipartRequestFlowCaseBuilder caseBuilder = new MultipartRequestFlowCaseBuilder();
         MultipartRequestFlowBuilder builder = new MultipartRequestFlowBuilder();
         builder.setTableId((short) 8);
         builder.setOutPort(85L);
index 6f73801c0f96131f620a550e7d17120aa250d2c6..4967b44633bdb564c9c446836a222d7f6c98f6aa 100644 (file)
@@ -25,8 +25,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.group._case.MultipartRequestGroupBuilder;
 
 /**
- * @author giuseppex.petralia@intel.com
+ * Unit tests for MultipartRequestGroupInputMessageFactory.
  *
+ * @author giuseppex.petralia@intel.com
  */
 public class MultipartRequestGroupInputMessageFactoryTest {
     ByteBuf bb = BufferHelper.buildBuffer("00 06 00 01 00 00 00 00 00 00 08 d2 00 00 00 00");
index 46c3a13b63e6143e0596504fa83b97094698f3d1..f6016186992ffee1375cd68c49c3276c0d4fc424 100644 (file)
@@ -26,8 +26,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.meter.config._case.MultipartRequestMeterConfigBuilder;
 
 /**
- * @author giuseppex.petralia@intel.com
+ * Unit tests for MultipartRequestMeterConfigInputMessageFactory.
  *
+ * @author giuseppex.petralia@intel.com
  */
 public class MultipartRequestMeterConfigInputMessageFactoryTest {
     private OFDeserializer<MultipartRequestInput> factory;
index b4f334f9318a3a30c77b05ac006d0d3bc8a2b307..9317c41f0533893a18007b1ae74276537362f7f4 100644 (file)
@@ -26,8 +26,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.meter._case.MultipartRequestMeterBuilder;
 
 /**
- * @author giuseppex.petralia@intel.com
+ * Unit tests for MultipartRequestMeterInputMessageFactory.
  *
+ * @author giuseppex.petralia@intel.com
  */
 public class MultipartRequestMeterInputMessageFactoryTest {
     private OFDeserializer<MultipartRequestInput> factory;
index 68482e366f7c1fca95ff10d11263e3c554c4a0ba..8d1df68eea682964ddc1336343e4a1bb37dcabf1 100644 (file)
@@ -25,8 +25,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.port.stats._case.MultipartRequestPortStatsBuilder;
 
 /**
- * @author giuseppex.petralia@intel.com
+ * Unit tests for MultipartRequestPortStatsInputMessageFactory.
  *
+ * @author giuseppex.petralia@intel.com
  */
 public class MultipartRequestPortStatsInputMessageFactoryTest {
     private OFDeserializer<MultipartRequestInput> factory;
index 6a746eada62fb5491275aa420ea40f613ded0ab6..65ff4f7662f698e755e15a0e4b92b54f7ad421a3 100644 (file)
@@ -25,8 +25,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.queue._case.MultipartRequestQueueBuilder;
 
 /**
- * @author giuseppex.petralia@intel.com
+ * Unit tests for MultipartRequestQueueInputMessageFactory.
  *
+ * @author giuseppex.petralia@intel.com
  */
 public class MultipartRequestQueueInputMessageFactoryTest {
     private OFDeserializer<MultipartRequestInput> factory;
index 600a7aafd2960303235da99dded6ecfda750711f..59dd8f43e4ae0d640f88c1151634b366d17ced38 100644 (file)
@@ -56,8 +56,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.table.features.properties.grouping.TableFeaturePropertiesBuilder;
 
 /**
- * @author giuseppex.petralia@intel.com
+ * Unit tests for MultipartRequestTableFeaturesInputMessageFactory.
  *
+ * @author giuseppex.petralia@intel.com
  */
 public class MultipartRequestTableFeaturesInputMessageFactoryTest {
     private OFDeserializer<MultipartRequestInput> factory;
@@ -73,9 +74,9 @@ public class MultipartRequestTableFeaturesInputMessageFactoryTest {
     @Test
     public void test() {
         ByteBuf bb = BufferHelper.buildBuffer("00 0c 00 01 00 00 00 00 00 68 01 00 00 00 00 00 4e 61 6d "
-                + "65 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 "
-                + "00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 10 00 01 "
-                + "00 04 00 02 00 04 00 04 00 04 00 02 00 05 01 00 00 00 00 04 00 08 00 00 00 04 00 08 00 08 80 00 02 04 ");
+            + "65 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 "
+            + "00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 10 00 01 "
+            + "00 04 00 02 00 04 00 04 00 04 00 02 00 05 01 00 00 00 00 04 00 08 00 00 00 04 00 08 00 08 80 00 02 04 ");
         MultipartRequestInput deserializedMessage = BufferHelper.deserialize(factory, bb);
         BufferHelper.checkHeaderV13(deserializedMessage);
         Assert.assertEquals("Wrong type", MultipartType.forValue(12), deserializedMessage.getType());
@@ -93,7 +94,7 @@ public class MultipartRequestTableFeaturesInputMessageFactoryTest {
     }
 
     public List<TableFeatures> createTableFeaturesList() {
-        List<TableFeatures> list = new ArrayList<>();
+        final List<TableFeatures> list = new ArrayList<>();
         TableFeaturesBuilder builder = new TableFeaturesBuilder();
         builder.setTableId((short) 1);
         builder.setName("Name");
@@ -107,7 +108,7 @@ public class MultipartRequestTableFeaturesInputMessageFactoryTest {
     }
 
     public List<TableFeatureProperties> createTableFeatureProperties() {
-        List<TableFeatureProperties> list = new ArrayList<>();
+        final List<TableFeatureProperties> list = new ArrayList<>();
         TableFeaturePropertiesBuilder builder = new TableFeaturePropertiesBuilder();
         builder.setType(TableFeaturesPropType.forValue(0));
         InstructionRelatedTableFeaturePropertyBuilder insBuilder = new InstructionRelatedTableFeaturePropertyBuilder();
@@ -140,7 +141,7 @@ public class MultipartRequestTableFeaturesInputMessageFactoryTest {
     }
 
     public List<MatchEntry> createMatchEntries() {
-        List<MatchEntry> entries = new ArrayList<>();
+        final List<MatchEntry> entries = new ArrayList<>();
         MatchEntryBuilder entriesBuilder = new MatchEntryBuilder();
         entriesBuilder.setOxmClass(OpenflowBasicClass.class);
         entriesBuilder.setOxmMatchField(InPhyPort.class);
index 8719dc2bb8c41078736a0c01e66380429263c6d3..5308022ccfc745a71f96b378a6c3fdaea634d38f 100644 (file)
@@ -22,8 +22,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev13
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartRequestInput;
 
 /**
- * @author giuseppex.petralia@intel.com
+ * Unit tests for MultipartRequestTableInputMessageFactory.
  *
+ * @author giuseppex.petralia@intel.com
  */
 public class MultipartRequestTableInputMessageFactoryTest {
     private OFDeserializer<MultipartRequestInput> factory;
index c90a2ea91d4ee115fc90153dc27b070bac0dfe72..ef0731f9b67e19a3db59a823bffbaeacc951fa18 100644 (file)
@@ -9,26 +9,27 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.factories;
 
 import io.netty.buffer.ByteBuf;
-
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegistry;
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
 import org.opendaylight.openflowjava.protocol.api.keys.MessageCodeKey;
+import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.deserialization.DeserializerRegistryImpl;
 import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;
-import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.ErrorMessage;
 
 /**
+ * Unit tests for OF10ErrorMessageFactory.
+ *
  * @author michal.polkorab
  */
 public class OF10ErrorMessageFactoryTest {
     private OFDeserializer<ErrorMessage> errorFactory;
 
     /**
-     * Initializes deserializer registry and lookups correct deserializer
+     * Initializes deserializer registry and lookups correct deserializer.
      */
     @Before
     public void startUp() {
@@ -39,7 +40,7 @@ public class OF10ErrorMessageFactoryTest {
     }
 
     /**
-     * Test of {@link ErrorMessageFactory} for correct translation into POJO
+     * Test of {@link ErrorMessageFactory} for correct translation into POJO.
      */
     @Test
     public void testWithoutData() {
@@ -105,7 +106,7 @@ public class OF10ErrorMessageFactoryTest {
     }
 
     /**
-     * Test of {@link ErrorMessageFactory} for correct translation into POJO
+     * Test of {@link ErrorMessageFactory} for correct translation into POJO.
      * - not existing code used
      */
     @Test
@@ -172,7 +173,7 @@ public class OF10ErrorMessageFactoryTest {
     }
 
     /**
-     * Test of {@link OF10ErrorMessageFactory} for correct translation into POJO
+     * Test of {@link OF10ErrorMessageFactory} for correct translation into POJO.
      */
     @Test
     public void testWithData() {
@@ -188,7 +189,7 @@ public class OF10ErrorMessageFactoryTest {
     }
 
     /**
-     * Test of {@link OF10ErrorMessageFactory} for correct translation into POJO
+     * Test of {@link OF10ErrorMessageFactory} for correct translation into POJO.
      */
     @Test
     public void testWithIncorrectTypeEnum() {
@@ -204,7 +205,7 @@ public class OF10ErrorMessageFactoryTest {
     }
 
     /**
-     * Test of {@link OF10ErrorMessageFactory} for correct translation into POJO
+     * Test of {@link OF10ErrorMessageFactory} for correct translation into POJO.
      */
     @Test
     public void testWithIncorrectCodeEnum() {
index 594ca829a102ebc8e3c5328241e1feb90590f27b..4322bd6433a348bddd6acedfd221864541762b1c 100644 (file)
@@ -9,16 +9,15 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.factories;
 
 import io.netty.buffer.ByteBuf;
-
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegistry;
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
 import org.opendaylight.openflowjava.protocol.api.keys.MessageCodeKey;
+import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.deserialization.DeserializerRegistryImpl;
 import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;
-import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.ActionTypeV10;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.CapabilitiesV10;
@@ -29,15 +28,16 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.features.reply.PhyPort;
 
 /**
- * @author michal.polkorab
+ * Unit tests for OF10FeaturesReplyMessageFactory.
  *
+ * @author michal.polkorab
  */
 public class OF10FeaturesReplyMessageFactoryTest {
 
     private OFDeserializer<GetFeaturesOutput> featuresFactory;
 
     /**
-     * Initializes deserializer registry and lookups correct deserializer
+     * Initializes deserializer registry and lookups correct deserializer.
      */
     @Before
     public void startUp() {
@@ -48,7 +48,7 @@ public class OF10FeaturesReplyMessageFactoryTest {
     }
 
     /**
-     * Testing {@link OF10FeaturesReplyMessageFactory} for correct translation into POJO
+     * Testing {@link OF10FeaturesReplyMessageFactory} for correct translation into POJO.
      */
     @Test
     public void test() {
@@ -72,7 +72,8 @@ public class OF10FeaturesReplyMessageFactoryTest {
         Assert.assertEquals("Wrong port - name", new String("ALOHA"), port.getName());
         Assert.assertEquals("Wrong port - config", new PortConfigV10(true, true, true, true, true, true, true),
                 port.getConfigV10());
-        Assert.assertEquals("Wrong port - state",  new PortStateV10(false, false, false, false, true, false, true, false),
+        Assert.assertEquals("Wrong port - state",  new PortStateV10(false, false, false, false, true,
+                false, true, false),
                 port.getStateV10());
         Assert.assertEquals("Wrong port - curr", new PortFeaturesV10(true, true, true, true, true, true, true,
                 true, true, true, true, true), port.getCurrentFeaturesV10());
@@ -85,7 +86,7 @@ public class OF10FeaturesReplyMessageFactoryTest {
     }
 
     /**
-     * Testing {@link OF10FeaturesReplyMessageFactory} for correct translation into POJO
+     * Testing {@link OF10FeaturesReplyMessageFactory} for correct translation into POJO.
      */
     @Test
     public void testWithTwoPortsSet() {
@@ -108,12 +109,12 @@ public class OF10FeaturesReplyMessageFactoryTest {
         Assert.assertEquals("Wrong port - state",  new PortStateV10(false, true, false, true, true, true, false, true),
                 port.getStateV10());
         port = builtByFactory.getPhyPort().get(1);
-        Assert.assertEquals("Wrong port - state",  new PortStateV10(false, false, false, false, false, false, true, false),
-                port.getStateV10());
+        Assert.assertEquals("Wrong port - state",
+                new PortStateV10(false, false, false, false, false, false, true, false), port.getStateV10());
     }
 
     /**
-     * Testing {@link OF10FeaturesReplyMessageFactory} for correct translation into POJO
+     * Testing {@link OF10FeaturesReplyMessageFactory} for correct translation into POJO.
      */
     @Test
     public void testWithNoPortsSet() {
@@ -122,7 +123,8 @@ public class OF10FeaturesReplyMessageFactoryTest {
         GetFeaturesOutput builtByFactory = BufferHelper.deserialize(featuresFactory, bb);
 
         BufferHelper.checkHeaderV10(builtByFactory);
-        Assert.assertEquals("Wrong capabilities", new CapabilitiesV10(false, false, false, false, false, false, false, false),
+        Assert.assertEquals("Wrong capabilities",
+                new CapabilitiesV10(false, false, false, false, false, false, false, false),
                 builtByFactory.getCapabilitiesV10());
         Assert.assertEquals("Wrong actions", new ActionTypeV10(false, false, false, false, false, false, false,
                 false, false, false, false, false, false), builtByFactory.getActionsV10());
index 97682d89085641b1eefcc12d9a5613f971fd151c..4805508cdb787a4c507fa7b40415ed9daaceed39 100644 (file)
@@ -19,8 +19,9 @@ import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetFeaturesInput;
 
 /**
- * @author giuseppex.petralia@intel.com
+ * Unit tests for OF10FeaturesRequestMessageFactory.
  *
+ * @author giuseppex.petralia@intel.com
  */
 public class OF10FeaturesRequestMessageFactoryTest {
     private OFDeserializer<GetFeaturesInput> factory;
index 9ff3f05585e7e42c1e9bcdfbc7e8c6c974df1b11..f66d11d78e1388f050211bd28834c88c4f028568 100644 (file)
@@ -37,8 +37,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.matc
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.FlowModInput;
 
 /**
- * @author giuseppex.petralia@intel.com
+ * Unit tests for OF10FlowModInputMessageFactory.
  *
+ * @author giuseppex.petralia@intel.com
  */
 public class OF10FlowModInputMessageFactoryTest {
     private OFDeserializer<FlowModInput> factory;
@@ -73,7 +74,7 @@ public class OF10FlowModInputMessageFactoryTest {
     }
 
     private static List<Action> createAction() {
-        List<Action> actions = new ArrayList<>();
+        final List<Action> actions = new ArrayList<>();
         ActionBuilder actionBuilder = new ActionBuilder();
         SetNwDstCaseBuilder nwDstCaseBuilder = new SetNwDstCaseBuilder();
         SetNwDstActionBuilder nwDstBuilder = new SetNwDstActionBuilder();
index c98b14f584c64dfe8ae6a569153f7478e4ee0d63..d919fc0f1878246be445deb5a561fa95ed4537fa 100644 (file)
@@ -8,19 +8,20 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.factories;
 
 import io.netty.buffer.ByteBuf;
-
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegistry;
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
 import org.opendaylight.openflowjava.protocol.api.keys.MessageCodeKey;
+import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.deserialization.DeserializerRegistryImpl;
 import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;
-import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.FlowRemovedMessage;
 
 /**
+ * Unit tests for OF10FlowRemovedMessageFactory.
+ *
  * @author michal.polkorab
  */
 public class OF10FlowRemovedMessageFactoryTest {
@@ -28,7 +29,7 @@ public class OF10FlowRemovedMessageFactoryTest {
     private OFDeserializer<FlowRemovedMessage> flowFactory;
 
     /**
-     * Initializes deserializer registry and lookups correct deserializer
+     * Initializes deserializer registry and lookups correct deserializer.
      */
     @Before
     public void startUp() {
@@ -39,10 +40,10 @@ public class OF10FlowRemovedMessageFactoryTest {
     }
 
     /**
-     * Testing {@link OF10FlowRemovedMessageFactory} for correct translation into POJO
+     * Testing {@link OF10FlowRemovedMessageFactory} for correct translation into POJO.
      */
     @Test
-    public void test(){
+    public void test() {
         ByteBuf bb = BufferHelper.buildBuffer("00 24 08 D1 00 20 AA BB CC DD EE FF "
                 + "AA BB CC DD EE FF 00 05 10 00 00 08 07 06 00 00 10 11 12 13 01 02 03 04 "//36
                 + "50 50 20 20 "// match
index 15873bd158f6bbd1b75a20df5f9e4436f46c1823..275ec289f83f58a1e756700614d525c1ee45e5ff 100644 (file)
@@ -21,8 +21,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev13
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetQueueConfigInput;
 
 /**
- * @author giuseppex.petralia@intel.com
+ * Unit tests for OF10GetQueueConfigInputMessageFactory.
  *
+ * @author giuseppex.petralia@intel.com
  */
 public class OF10GetQueueConfigInputMessageFactoryTest {
     private OFDeserializer<GetQueueConfigInput> factory;
index baee268809dfb5210efb5f83ab066fad5aba4395..9cf750fb3f742421e38bede035a285469d008424 100644 (file)
@@ -9,19 +9,20 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.factories;
 
 import io.netty.buffer.ByteBuf;
-
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegistry;
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
 import org.opendaylight.openflowjava.protocol.api.keys.MessageCodeKey;
+import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.deserialization.DeserializerRegistryImpl;
 import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;
-import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.HelloMessage;
 
 /**
+ * Unit tests for OF10HelloMessageFactory.
+ *
  * @author michal.polkorab
  */
 public class OF10HelloMessageFactoryTest {
@@ -29,7 +30,7 @@ public class OF10HelloMessageFactoryTest {
     private OFDeserializer<HelloMessage> helloFactory;
 
     /**
-     * Initializes deserializer registry and lookups correct deserializer
+     * Initializes deserializer registry and lookups correct deserializer.
      */
     @Before
     public void startUp() {
@@ -40,7 +41,7 @@ public class OF10HelloMessageFactoryTest {
     }
 
     /**
-     * Testing {@link OF10HelloMessageFactory} for correct translation into POJO
+     * Testing {@link OF10HelloMessageFactory} for correct translation into POJO.
      */
     @Test
     public void testWithoutElements() {
@@ -52,8 +53,8 @@ public class OF10HelloMessageFactoryTest {
         Assert.assertNull("Wrong elements", builtByFactory.getElements());
     }
 
-       /**
-     * Testing {@link OF10HelloMessageFactory} for correct translation into POJO
+    /**
+     * Testing {@link OF10HelloMessageFactory} for correct translation into POJO.
      */
     @Test
     public void testWithElements() {
index 53ed80fcd0a3fc1bda0339f02eba3d6d2caeb41f..58bca802a4cd160cff10e05f522855fea61faa85 100644 (file)
@@ -8,21 +8,22 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.factories;
 
 import io.netty.buffer.ByteBuf;
-
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegistry;
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
 import org.opendaylight.openflowjava.protocol.api.keys.MessageCodeKey;
+import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.deserialization.DeserializerRegistryImpl;
 import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;
 import org.opendaylight.openflowjava.util.ByteBufUtils;
-import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PacketInReason;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PacketInMessage;
 
 /**
+ * Unit tests for OF10PacketInMessageFactory.
+ *
  * @author michal.polkorab
  */
 public class OF10PacketInMessageFactoryTest {
@@ -30,7 +31,7 @@ public class OF10PacketInMessageFactoryTest {
     private OFDeserializer<PacketInMessage> packetInFactory;
 
     /**
-     * Initializes deserializer registry and lookups correct deserializer
+     * Initializes deserializer registry and lookups correct deserializer.
      */
     @Before
     public void startUp() {
@@ -41,10 +42,10 @@ public class OF10PacketInMessageFactoryTest {
     }
 
     /**
-     * Testing {@link OF10PacketInMessageFactory} for correct translation into POJO
+     * Testing {@link OF10PacketInMessageFactory} for correct translation into POJO.
      */
     @Test
-    public void test(){
+    public void test() {
         ByteBuf bb = BufferHelper.buildBuffer("00 01 02 03 01 02 01 02 00 00 01 02 03 04");
         PacketInMessage builtByFactory = BufferHelper.deserialize(packetInFactory, bb);
 
@@ -57,13 +58,13 @@ public class OF10PacketInMessageFactoryTest {
     }
 
     /**
-     * Testing {@link OF10PacketInMessageFactory} for correct translation into POJO
+     * Testing {@link OF10PacketInMessageFactory} for correct translation into POJO.
      */
     @Test
-    public void testWithNoAdditionalData(){
+    public void testWithNoAdditionalData() {
         ByteBuf bb = BufferHelper.buildBuffer("00 01 02 03 01 02 01 02 00 00");
         PacketInMessage builtByFactory = BufferHelper.deserialize(packetInFactory, bb);
 
         Assert.assertNull("Wrong data", builtByFactory.getData());
     }
-}
\ No newline at end of file
+}
index 93425026d00500c3860e72be9898dac2d614b909..a3231f3ea923e9dd943e61288e47bc22f9dfd670 100644 (file)
@@ -29,8 +29,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev13
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PacketOutInput;
 
 /**
- * @author giuseppex.petralia@intel.com
+ * Unit tests for OF10PacketOutInputMessageFactory.
  *
+ * @author giuseppex.petralia@intel.com
  */
 public class OF10PacketOutInputMessageFactoryTest {
     private OFDeserializer<PacketOutInput> factory;
@@ -60,13 +61,13 @@ public class OF10PacketOutInputMessageFactoryTest {
     }
 
     private static List<Action> createActionList() {
-        List<Action> actions = new ArrayList<>();
-        ActionBuilder actionBuilder = new ActionBuilder();
+        final List<Action> actions = new ArrayList<>();
         OutputActionCaseBuilder caseBuilder = new OutputActionCaseBuilder();
         OutputActionBuilder outputBuilder = new OutputActionBuilder();
         outputBuilder.setPort(new PortNumber(42L));
         outputBuilder.setMaxLength(50);
         caseBuilder.setOutputAction(outputBuilder.build());
+        ActionBuilder actionBuilder = new ActionBuilder();
         actionBuilder.setActionChoice(caseBuilder.build());
         actions.add(actionBuilder.build());
         actionBuilder = new ActionBuilder();
index 660ab5ce1e80276d0c7616d1a09b0f7753407b64..4e17b5597b79bb7d925898b6829d0a36a09ab3fe 100644 (file)
@@ -24,8 +24,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev13
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PortModInput;
 
 /**
- * @author giuseppex.petralia@intel.com
+ * Unit tests for OF10PortModInputMessageFactory.
  *
+ * @author giuseppex.petralia@intel.com
  */
 public class OF10PortModInputMessageFactoryTest {
     private OFDeserializer<PortModInput> factory;
index 9467e8d127bba2c66cdc898addc7f6bc8077aa90..7a20eeb6a73b726b5861f62f3b0158d9a55e801a 100644 (file)
@@ -9,16 +9,15 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.factories;
 
 import io.netty.buffer.ByteBuf;
-
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegistry;
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
 import org.opendaylight.openflowjava.protocol.api.keys.MessageCodeKey;
+import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.deserialization.DeserializerRegistryImpl;
 import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;
-import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortConfigV10;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortFeaturesV10;
@@ -27,15 +26,16 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev13
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PortStatusMessage;
 
 /**
- * @author michal.polkorab
+ * Unit tests for OF10PortStatusMessageFactory.
  *
+ * @author michal.polkorab
  */
 public class OF10PortStatusMessageFactoryTest {
 
     private OFDeserializer<PortStatusMessage> statusFactory;
 
     /**
-     * Initializes deserializer registry and lookups correct deserializer
+     * Initializes deserializer registry and lookups correct deserializer.
      */
     @Before
     public void startUp() {
@@ -46,10 +46,10 @@ public class OF10PortStatusMessageFactoryTest {
     }
 
     /**
-     * Testing {@link OF10PortStatusMessageFactory} for correct translation into POJO
+     * Testing {@link OF10PortStatusMessageFactory} for correct translation into POJO.
      */
     @Test
-    public void test(){
+    public void test() {
         ByteBuf bb = BufferHelper.buildBuffer("00 00 00 00 00 00 00 00 "
                 + "00 10 01 01 05 01 04 02 41 4C 4F 48 41 00 00 00 00 00 00 00 00 00 00 "
                 + "00 00 00 00 15 00 00 00 01 00 00 00 31 00 00 04 42 00 00 03 0C 00 00 08 88");
@@ -58,19 +58,24 @@ public class OF10PortStatusMessageFactoryTest {
         BufferHelper.checkHeaderV10(builtByFactory);
         Assert.assertEquals("Wrong reason", PortReason.OFPPRADD, builtByFactory.getReason());
         Assert.assertEquals("Wrong port - port-no", 16, builtByFactory.getPortNo().intValue());
-        Assert.assertEquals("Wrong builtByFactory - hw-addr", new MacAddress("01:01:05:01:04:02"), builtByFactory.getHwAddr());
+        Assert.assertEquals("Wrong builtByFactory - hw-addr", new MacAddress("01:01:05:01:04:02"),
+                builtByFactory.getHwAddr());
         Assert.assertEquals("Wrong builtByFactory - name", new String("ALOHA"), builtByFactory.getName());
-        Assert.assertEquals("Wrong builtByFactory - config", new PortConfigV10(true, false, false, true, false, false, true),
-                builtByFactory.getConfigV10());
-        Assert.assertEquals("Wrong builtByFactory - state", new PortStateV10(false, true, false, false, false, false, true, false),
-                builtByFactory.getStateV10());
-        Assert.assertEquals("Wrong builtByFactory - curr", new PortFeaturesV10(false, false, false, false, true, true, true,
-                false, false, false, false, false), builtByFactory.getCurrentFeaturesV10());
-        Assert.assertEquals("Wrong builtByFactory - advertised", new PortFeaturesV10(false, false, true, true, false, false,
-                false, false, false, false, true, false), builtByFactory.getAdvertisedFeaturesV10());
-        Assert.assertEquals("Wrong builtByFactory - supbuiltByFactoryed", new PortFeaturesV10(true, true, false, false, false, false,
-                false, true, false, true, false, false), builtByFactory.getSupportedFeaturesV10());
-        Assert.assertEquals("Wrong builtByFactory - peer", new PortFeaturesV10(true, false, false, false, false, false, false,
-                false, true, false, false, true), builtByFactory.getPeerFeaturesV10());
+        Assert.assertEquals("Wrong builtByFactory - config",
+                new PortConfigV10(true, false, false, true, false, false, true), builtByFactory.getConfigV10());
+        Assert.assertEquals("Wrong builtByFactory - state",
+                new PortStateV10(false, true, false, false, false, false, true, false), builtByFactory.getStateV10());
+        Assert.assertEquals("Wrong builtByFactory - curr",
+                new PortFeaturesV10(false, false, false, false, true, true, true, false, false, false, false, false),
+                builtByFactory.getCurrentFeaturesV10());
+        Assert.assertEquals("Wrong builtByFactory - advertised",
+                new PortFeaturesV10(false, false, true, true, false, false, false, false, false, false, true, false),
+                builtByFactory.getAdvertisedFeaturesV10());
+        Assert.assertEquals("Wrong builtByFactory - supbuiltByFactoryed",
+                new PortFeaturesV10(true, true, false, false, false, false, false, true, false, true, false, false),
+                builtByFactory.getSupportedFeaturesV10());
+        Assert.assertEquals("Wrong builtByFactory - peer",
+                new PortFeaturesV10(true, false, false, false, false, false, false, false, true, false, false, true),
+                builtByFactory.getPeerFeaturesV10());
     }
 }
index c4ccb4e34137f6f12a390bb279f22c07a876b45e..d17644ce7d696468002bd7a4725f50b46f036873 100644 (file)
@@ -9,7 +9,6 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.factories;
 
 import io.netty.buffer.ByteBuf;
-
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
@@ -25,15 +24,16 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.queue.get.config.reply.Queues;
 
 /**
- * @author michal.polkorab
+ * Unit tests for OF10QueueGetConfigReplyMessageFactory.
  *
+ * @author michal.polkorab
  */
 public class OF10QueueGetConfigReplyMessageFactoryTest {
 
     private OFDeserializer<GetQueueConfigOutput> queueFactory;
 
     /**
-     * Initializes deserializer registry and lookups correct deserializer
+     * Initializes deserializer registry and lookups correct deserializer.
      */
     @Before
     public void startUp() {
@@ -45,7 +45,7 @@ public class OF10QueueGetConfigReplyMessageFactoryTest {
 
     /**
      * Testing of {@link OF10QueueGetConfigReplyMessageFactory} for correct
-     * translation into POJO
+     * translation into POJO.
      */
     @Test
     public void test() {
index ce43d0f16f8a69b64c7ae0785086725d20fc9f04..571df6a42809b12ddbcb301ef1db7c8d9e9b0419 100644 (file)
@@ -8,9 +8,7 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.factories;
 
 import io.netty.buffer.ByteBuf;
-
 import java.math.BigInteger;
-
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
@@ -39,15 +37,18 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.table._case.MultipartReplyTable;
 
 /**
- * @author michal.polkorab
+ * Unit tests for OF10StatsReplyMessageFactory.
  *
+ * @author michal.polkorab
  */
 public class OF10StatsReplyMessageFactoryTest {
+    static final int DESC_STR_LEN = 256;
+    static final int SERIAL_NUM_LEN = 32;
 
     private OFDeserializer<MultipartReplyMessage> statsFactory;
 
     /**
-     * Initializes deserializer registry and lookups correct deserializer
+     * Initializes deserializer registry and lookups correct deserializer.
      */
     @Before
     public void startUp() {
@@ -58,12 +59,10 @@ public class OF10StatsReplyMessageFactoryTest {
     }
 
     /**
-     * Testing OF10StatsReplyMessageFactory (Desc) for correct deserialization
+     * Testing OF10StatsReplyMessageFactory (Desc) for correct deserialization.
      */
     @Test
     public void testDesc() {
-        final int DESC_STR_LEN = 256;
-        final int SERIAL_NUM_LEN = 32;
         ByteBuf bb = BufferHelper.buildBuffer("00 00 00 00");
 
         String mfrDesc = "Manufacturer description";
@@ -112,7 +111,7 @@ public class OF10StatsReplyMessageFactoryTest {
     }
 
     /**
-     * Testing OF10StatsReplyMessageFactory (Flow) for correct deserialization
+     * Testing OF10StatsReplyMessageFactory (Flow) for correct deserialization.
      */
     @Test
     public void testFlow() {
@@ -159,7 +158,7 @@ public class OF10StatsReplyMessageFactoryTest {
     }
 
     /**
-     * Testing OF10StatsReplyMessageFactory (Aggregate) for correct deserialization
+     * Testing OF10StatsReplyMessageFactory (Aggregate) for correct deserialization.
      */
     @Test
     public void testAggregate() {
@@ -184,7 +183,7 @@ public class OF10StatsReplyMessageFactoryTest {
     }
 
     /**
-     * Testing OF10StatsReplyMessageFactory (Table) for correct deserialization
+     * Testing OF10StatsReplyMessageFactory (Table) for correct deserialization.
      */
     @Test
     public void testTable() {
@@ -219,7 +218,7 @@ public class OF10StatsReplyMessageFactoryTest {
     }
 
     /**
-     * Testing OF10StatsReplyMessageFactory (Port) for correct deserialization
+     * Testing OF10StatsReplyMessageFactory (Port) for correct deserialization.
      */
     @Test
     public void testPort() {
@@ -280,7 +279,7 @@ public class OF10StatsReplyMessageFactoryTest {
     }
 
     /**
-     * Testing OF10StatsReplyMessageFactory (Queue) for correct deserialization
+     * Testing OF10StatsReplyMessageFactory (Queue) for correct deserialization.
      */
     @Test
     public void testQueue() {
index 5c8ce2159c102c257bc5b3047b5ffa62e250910b..1bf2e776c4c8146604ea88c2d7a80f54000ed9a0 100644 (file)
@@ -28,8 +28,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.aggregate._case.MultipartRequestAggregateBuilder;
 
 /**
- * @author giuseppex.petralia@intel.com
+ * Unit tests for OF10StatsRequestInputAggregateFactory.
  *
+ * @author giuseppex.petralia@intel.com
  */
 public class OF10StatsRequestInputAggregateFactoryTest {
     private OFDeserializer<MultipartRequestInput> factory;
@@ -56,8 +57,8 @@ public class OF10StatsRequestInputAggregateFactoryTest {
     }
 
     private static MultipartRequestBody createMultipartRequestBody() {
-        MultipartRequestAggregateCaseBuilder caseBuilder = new MultipartRequestAggregateCaseBuilder();
-        MultipartRequestAggregateBuilder aggregateBuilder = new MultipartRequestAggregateBuilder();
+        final MultipartRequestAggregateCaseBuilder caseBuilder = new MultipartRequestAggregateCaseBuilder();
+        final MultipartRequestAggregateBuilder aggregateBuilder = new MultipartRequestAggregateBuilder();
         MatchV10Builder matchBuilder = new MatchV10Builder();
         matchBuilder.setWildcards(
                 new FlowWildcardsV10(false, false, false, false, false, false, false, false, false, false));
index 545d1d7b93fffe3868dc5366a31f92260ece8d95..dba8db29d1e857c92f8f4690157c71e05105ce6f 100644 (file)
@@ -24,8 +24,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.desc._case.MultipartRequestDescBuilder;
 
 /**
- * @author giuseppex.petralia@intel.com
+ * Unit tests for OF10StatsRequestInputDescFactory.
  *
+ * @author giuseppex.petralia@intel.com
  */
 public class OF10StatsRequestInputDescFactoryTest {
     private OFDeserializer<MultipartRequestInput> factory;
index 613ff4a1098db51036d5002add0337a9b2d0cf49..72abb5e4b9d3a31bce859461c0be939099a04772 100644 (file)
@@ -28,8 +28,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.flow._case.MultipartRequestFlowBuilder;
 
 /**
- * @author giuseppex.petralia@intel.com
+ * Unit tests for OF10StatsRequestInputFlowFactory.
  *
+ * @author giuseppex.petralia@intel.com
  */
 public class OF10StatsRequestInputFlowFactoryTest {
     private OFDeserializer<MultipartRequestInput> factory;
@@ -56,8 +57,8 @@ public class OF10StatsRequestInputFlowFactoryTest {
     }
 
     private static MultipartRequestBody createMultipartRequestBody() {
-        MultipartRequestFlowCaseBuilder caseBuilder = new MultipartRequestFlowCaseBuilder();
-        MultipartRequestFlowBuilder flowBuilder = new MultipartRequestFlowBuilder();
+        final MultipartRequestFlowCaseBuilder caseBuilder = new MultipartRequestFlowCaseBuilder();
+        final MultipartRequestFlowBuilder flowBuilder = new MultipartRequestFlowBuilder();
         MatchV10Builder matchBuilder = new MatchV10Builder();
         matchBuilder.setWildcards(new FlowWildcardsV10(true, true, true, true, true, true, true, true, true, true));
         matchBuilder.setNwSrcMask((short) 8);
index afe70c929f87d2ec187cf7764049b5c90707ba7c..bb00d34e73d56c15babf38c9d399d04fd6d07bad 100644 (file)
@@ -24,8 +24,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.port.stats._case.MultipartRequestPortStatsBuilder;
 
 /**
- * @author giuseppex.petralia@intel.com
+ * Unit tests for OF10StatsRequestInputPortStatsFactory.
  *
+ * @author giuseppex.petralia@intel.com
  */
 public class OF10StatsRequestInputPortStatsFactoryTest {
     private OFDeserializer<MultipartRequestInput> factory;
index 39c571cd7c93808a16b641dadafbe4455b56c648..5d2772b2d27595cb220682bd0d9160a6fdfd0257 100644 (file)
@@ -24,8 +24,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.queue._case.MultipartRequestQueueBuilder;
 
 /**
- * @author giuseppex.petralia@intel.com
+ * Unit tests for OF10StatsRequestInputQueueFactory.
  *
+ * @author giuseppex.petralia@intel.com
  */
 public class OF10StatsRequestInputQueueFactoryTest {
     private OFDeserializer<MultipartRequestInput> factory;
index bc9bdf7783eb7024e0ee7b58d41221fb9d287d2f..c8ba0acd79d5c2482c310c8c9f7b6e7d1d880412 100644 (file)
@@ -24,8 +24,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.table._case.MultipartRequestTableBuilder;
 
 /**
- * @author giuseppex.petralia@intel.com
+ * Unit tests for OF10StatsRequestInputTableFactory.
  *
+ * @author giuseppex.petralia@intel.com
  */
 public class OF10StatsRequestInputTableFactoryTest {
     private OFDeserializer<MultipartRequestInput> factory;
index 105329dbe2c96307b42f889be5dcac095fe929f0..9c19c725ad6ed213a9aa4e401d919464a7fb43de 100644 (file)
@@ -9,31 +9,31 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.factories;
 
 import io.netty.buffer.ByteBuf;
-
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegistry;
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
 import org.opendaylight.openflowjava.protocol.api.keys.MessageCodeKey;
+import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.deserialization.DeserializerRegistryImpl;
 import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;
 import org.opendaylight.openflowjava.util.ByteBufUtils;
-import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PacketInReason;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.TableId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PacketInMessage;
 
 /**
- * @author timotej.kubas
+ * Unit tests for PacketInMessageFactory.
  *
+ * @author timotej.kubas
  */
 public class PacketInMessageFactoryTest {
 
     private OFDeserializer<PacketInMessage> packetInFactory;
 
     /**
-     * Initializes deserializer registry and lookups correct deserializer
+     * Initializes deserializer registry and lookups correct deserializer.
      */
     @Before
     public void startUp() {
@@ -44,10 +44,10 @@ public class PacketInMessageFactoryTest {
     }
 
     /**
-     * Testing {@link PacketInMessageFactory} for correct translation into POJO
+     * Testing {@link PacketInMessageFactory} for correct translation into POJO.
      */
     @Test
-    public void test(){
+    public void test() {
         ByteBuf bb = BufferHelper.buildBuffer("00 01 02 03 01 02 01 04 00 01 02 03 04 05 06 07 00 01 00 0C"
                 + " 80 00 02 04 00 00 00 01 00 00 00 00 00 00 01 02 03 04");
         PacketInMessage builtByFactory = BufferHelper.deserialize(packetInFactory, bb);
index 8a2b1e98bfd4fd23b31ef7d161cfd4c9c8fead70..2e32248ca028513e12870d564d32ccb42192ac49 100644 (file)
@@ -30,8 +30,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev13
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PacketOutInput;
 
 /**
- * @author giuseppex.petralia@intel.com
+ * Unit tests for PacketOutInputMessageFactory.
  *
+ * @author giuseppex.petralia@intel.com
  */
 public class PacketOutInputMessageFactoryTest {
     private OFDeserializer<PacketOutInput> factory;
@@ -48,9 +49,9 @@ public class PacketOutInputMessageFactoryTest {
     @Test
     public void test() {
         ByteBuf bb = BufferHelper.buildBuffer(
-                "00 00 01 00 00 00 01 00 00 28 00 00 00 00 00 00 00 11 00 08 00 19 00 00 00 12 00 08 00 00 00 00 00 12 "
-                        + "00 08 00 00 00 00 00 12 00 08 00 00 00 00 00 12 00 08 00 00 00 00 00 00 01 02 03 04 05 06 07 08 09 10 "
-                        + "11 12 13 14");
+            "00 00 01 00 00 00 01 00 00 28 00 00 00 00 00 00 00 11 00 08 00 19 00 00 00 12 00 08 00 00 00 00 00 12 "
+            + "00 08 00 00 00 00 00 12 00 08 00 00 00 00 00 12 00 08 00 00 00 00 00 00 01 02 03 04 05 06 07 08 09 10 "
+            + "11 12 13 14");
         PacketOutInput deserializedMessage = BufferHelper.deserialize(factory, bb);
         BufferHelper.checkHeaderV13(deserializedMessage);
 
@@ -62,7 +63,7 @@ public class PacketOutInputMessageFactoryTest {
     }
 
     private List<Action> createAction() {
-        List<Action> actions = new ArrayList<>();
+        final List<Action> actions = new ArrayList<>();
         ActionBuilder actionBuilder = new ActionBuilder();
         PushVlanCaseBuilder pushVlanCaseBuilder = new PushVlanCaseBuilder();
         PushVlanActionBuilder pushVlanBuilder = new PushVlanActionBuilder();
index b27bb279132fb564f22ced47bea3c529ace24e8a..a5e39f1c2f42072d7e26483e6826ec4edf154463 100644 (file)
@@ -24,8 +24,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev13
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PortModInput;
 
 /**
- * @author giuseppex.petralia@intel.com
+ * Unit tests for PortModInputMessageFactory.
  *
+ * @author giuseppex.petralia@intel.com
  */
 public class PortModInputMessageFactoryTest {
     private OFDeserializer<PortModInput> factory;
index 84653207f98849762d51c3fe75923ce0be591865..37e2148695a830e06897ef51ae9930470ca65a8a 100644 (file)
 package org.opendaylight.openflowjava.protocol.impl.deserialization.factories;
 
 import io.netty.buffer.ByteBuf;
-
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegistry;
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
 import org.opendaylight.openflowjava.protocol.api.keys.MessageCodeKey;
+import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.deserialization.DeserializerRegistryImpl;
 import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;
-import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortConfig;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortFeatures;
@@ -27,6 +26,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev13
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PortStatusMessage;
 
 /**
+ * Unit tests for PortStatusMessageFactory.
+ *
  * @author timotej.kubas
  * @author michal.polkorab
  */
@@ -35,7 +36,7 @@ public class PortStatusMessageFactoryTest {
     private OFDeserializer<PortStatusMessage> statusFactory;
 
     /**
-     * Initializes deserializer registry and lookups correct deserializer
+     * Initializes deserializer registry and lookups correct deserializer.
      */
     @Before
     public void startUp() {
@@ -46,26 +47,26 @@ public class PortStatusMessageFactoryTest {
     }
 
     /**
-     * Testing {@link PortStatusMessageFactory} for correct translation into POJO
+     * Testing {@link PortStatusMessageFactory} for correct translation into POJO.
      */
     @Test
-    public void test(){
-        ByteBuf bb = BufferHelper.buildBuffer("01 " + //reason
-                                              "00 00 00 00 00 00 00 " + //padding
-                                              "00 01 02 03 " + //port no
-                                              "00 00 00 00 " + //padding in ofp_port1
-                                              "08 00 27 00 B0 EB " + //mac address
-                                              "00 00 " + //padding in ofp_port2
-                                              "73 31 2d 65 74 68 31 00 00 00 00 00 00 00 00 00 " + // port name, String "s1-eth1"
-                                              "00 00 00 41 " + //port config
-                                              "00 00 00 05 " + //port state
-                                              "00 00 00 81 " + //current features
-                                              "00 00 00 A1 " + //advertised features
-                                              "00 00 00 B1 " + //supported features
-                                              "00 00 00 81 " + //peer features
-                                              "00 00 00 81 " + //curr speed
-                                              "00 00 00 80" //max speed
-                                              );
+    public void test() {
+        ByteBuf bb = BufferHelper.buildBuffer(
+                "01 " + //reason
+                "00 00 00 00 00 00 00 " + //padding
+                "00 01 02 03 " + //port no
+                "00 00 00 00 " + //padding in ofp_port1
+                "08 00 27 00 B0 EB " + //mac address
+                "00 00 " + //padding in ofp_port2
+                "73 31 2d 65 74 68 31 00 00 00 00 00 00 00 00 00 " + // port name, String "s1-eth1"
+                "00 00 00 41 " + //port config
+                "00 00 00 05 " + //port state
+                "00 00 00 81 " + //current features
+                "00 00 00 A1 " + //advertised features
+                "00 00 00 B1 " + //supported features
+                "00 00 00 81 " + //peer features
+                "00 00 00 81 " + //curr speed
+                "00 00 00 80"); //max speed
 
         PortStatusMessage builtByFactory = BufferHelper.deserialize(statusFactory, bb);
 
@@ -93,20 +94,21 @@ public class PortStatusMessageFactoryTest {
     }
 
     /**
-     * Testing {@link PortStatusMessageFactory} for correct translation into POJO
+     * Testing {@link PortStatusMessageFactory} for correct translation into POJO.
      */
     @Test
-    public void testWithDifferentBitmaps(){
-        ByteBuf bb = BufferHelper.buildBuffer("01 00 00 00 00 00 00 00 " + //reason, padding
-                                              "00 01 02 03 00 00 00 00 " + //port no, padding
-                                              "08 00 27 00 B0 EB 00 00 " + //mac address, padding
-                                              "73 31 2d 65 74 68 31 00 00 00 00 00 00 00 00 00 " + // port name, String "s1-eth1"
-                                              "00 00 00 24 " + //port config
-                                              "00 00 00 02 " + //port state
-                                              "00 00 00 81 00 00 00 A1 " + //current + advertised features
-                                              "00 00 FF FF 00 00 00 00 " + //supported + peer features
-                                              "00 00 00 81 00 00 00 80" //curr speed, max speed
-                                              );
+    public void testWithDifferentBitmaps() {
+        ByteBuf bb = BufferHelper.buildBuffer(
+                "01 00 00 00 00 00 00 00 " + //reason, padding
+                "00 01 02 03 00 00 00 00 " + //port no, padding
+                "08 00 27 00 B0 EB 00 00 " + //mac address, padding
+                "73 31 2d 65 74 68 31 00 00 00 00 00 00 00 00 00 " + // port name, String "s1-eth1"
+                "00 00 00 24 " + //port config
+                "00 00 00 02 " + //port state
+                "00 00 00 81 00 00 00 A1 " + //current + advertised features
+                "00 00 FF FF 00 00 00 00 " + //supported + peer features
+                "00 00 00 81 00 00 00 80"); //curr speed, max speed
+
         PortStatusMessage message = BufferHelper.deserialize(statusFactory, bb);
 
         Assert.assertEquals("Wrong portConfig", new PortConfig(true, false, true, false), message.getConfig());
index f8102e5fc205638acff4c132336b45025cd2f23a..497f5aa00003ff8318ac6d027e360a35fbb5374b 100644 (file)
@@ -9,10 +9,8 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.factories;
 
 import io.netty.buffer.ByteBuf;
-
 import java.util.ArrayList;
 import java.util.List;
-
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
@@ -34,6 +32,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.queue.property.header.QueuePropertyBuilder;
 
 /**
+ * Unit tests for QueueGetConfigReplyMessageFactoryMulti.
+ *
  * @author timotej.kubas
  * @author michal.polkorab
  */
@@ -42,7 +42,7 @@ public class QueueGetConfigReplyMessageFactoryMultiTest {
     private OFDeserializer<GetQueueConfigOutput> queueFactory;
 
     /**
-     * Initializes deserializer registry and lookups correct deserializer
+     * Initializes deserializer registry and lookups correct deserializer.
      */
     @Before
     public void startUp() {
@@ -54,7 +54,7 @@ public class QueueGetConfigReplyMessageFactoryMultiTest {
 
     /**
      * Testing of {@link QueueGetConfigReplyMessageFactory} for correct
-     * translation into POJO
+     * translation into POJO.
      */
     @Test
     public void test() {
@@ -101,7 +101,7 @@ public class QueueGetConfigReplyMessageFactoryMultiTest {
     }
 
     private static List<QueueProperty> createPropertiesList() {
-        List<QueueProperty> propertiesList = new ArrayList<>();
+        final List<QueueProperty> propertiesList = new ArrayList<>();
         QueuePropertyBuilder pb = new QueuePropertyBuilder();
         pb.setProperty(QueueProperties.forValue(2));
         RateQueuePropertyBuilder rateBuilder = new RateQueuePropertyBuilder();
index 3be61213d81ff4b24a4e20a7c636ee397c558653..2771b59f5d2c695765d3d083ef2eabb524b8ef55 100644 (file)
@@ -9,10 +9,8 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.factories;
 
 import io.netty.buffer.ByteBuf;
-
 import java.util.ArrayList;
 import java.util.List;
-
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
@@ -34,6 +32,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.queue.property.header.QueuePropertyBuilder;
 
 /**
+ * Unit tests for QueueGetConfigReplyMessageFactory.
+ *
  * @author timotej.kubas
  * @author michal.polkorab
  */
@@ -42,7 +42,7 @@ public class QueueGetConfigReplyMessageFactoryTest {
     private OFDeserializer<GetQueueConfigOutput> queueFactory;
 
     /**
-     * Initializes deserializer registry and lookups correct deserializer
+     * Initializes deserializer registry and lookups correct deserializer.
      */
     @Before
     public void startUp() {
@@ -53,19 +53,20 @@ public class QueueGetConfigReplyMessageFactoryTest {
     }
 
     /**
-     * Testing {@link QueueGetConfigReplyMessageFactory} for correct translation into POJO
+     * Testing {@link QueueGetConfigReplyMessageFactory} for correct translation into POJO.
      */
     @Test
-    public void test(){
-        ByteBuf bb = BufferHelper.buildBuffer("00 00 00 03 00 00 00 00 00 00 00 01 00 00 00 03 00 20 00 00 00 00 00 00 00 02 00 10 00 00 00 00 00 05 00 00 00 00 00 00");
+    public void test() {
+        ByteBuf bb = BufferHelper.buildBuffer("00 00 00 03 00 00 00 00 00 00 00 01 00 00 00 03 00 20 00 00 00 00 "
+                + "00 00 00 02 00 10 00 00 00 00 00 05 00 00 00 00 00 00");
         GetQueueConfigOutput builtByFactory = BufferHelper.deserialize(queueFactory, bb);
         BufferHelper.checkHeaderV13(builtByFactory);
         Assert.assertEquals("Wrong port", 3L, builtByFactory.getPort().getValue().longValue());
         Assert.assertEquals("Wrong queues", builtByFactory.getQueues(), createQueuesList());
     }
 
-    private static List<Queues> createQueuesList(){
-        List<Queues> queuesList = new ArrayList<>();
+    private static List<Queues> createQueuesList() {
+        final List<Queues> queuesList = new ArrayList<>();
         QueuesBuilder qb = new QueuesBuilder();
         qb.setQueueId(new QueueId(1L));
         qb.setPort(new PortNumber(3L));
@@ -75,8 +76,8 @@ public class QueueGetConfigReplyMessageFactoryTest {
         return queuesList;
     }
 
-    private static List<QueueProperty> createPropertiesList(){
-        List<QueueProperty> propertiesList = new ArrayList<>();
+    private static List<QueueProperty> createPropertiesList() {
+        final List<QueueProperty> propertiesList = new ArrayList<>();
         QueuePropertyBuilder pb = new QueuePropertyBuilder();
         pb.setProperty(QueueProperties.forValue(2));
         RateQueuePropertyBuilder rateBuilder = new RateQueuePropertyBuilder();
index 318f85aceb6a6974a10e599d049718c08d1e7273..573a0cb033ca6a3f440bd53ac5db9433c05e72d2 100644 (file)
@@ -9,19 +9,20 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.factories;
 
 import io.netty.buffer.ByteBuf;
-
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegistry;
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
 import org.opendaylight.openflowjava.protocol.api.keys.MessageCodeKey;
+import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.deserialization.DeserializerRegistryImpl;
 import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;
-import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.RoleRequestOutput;
 
 /**
+ * Unit tests for RoleReplyMessageFactory.
+ *
  * @author timotej.kubas
  * @author michal.polkorab
  */
@@ -30,7 +31,7 @@ public class RoleReplyMessageFactoryTest {
     private OFDeserializer<RoleRequestOutput> roleFactory;
 
     /**
-     * Initializes deserializer registry and lookups correct deserializer
+     * Initializes deserializer registry and lookups correct deserializer.
      */
     @Before
     public void startUp() {
@@ -41,10 +42,10 @@ public class RoleReplyMessageFactoryTest {
     }
 
    /**
-    * Testing of {@link RoleReplyMessageFactory} for correct translation into POJO
+    * Testing of {@link RoleReplyMessageFactory} for correct translation into POJO.
     */
     @Test
-    public void test(){
+    public void test() {
         ByteBuf bb = BufferHelper.buildBuffer("00 00 00 02 00 00 00 00 00 01 02 03 04 05 06 07");
         RoleRequestOutput builtByFactory = BufferHelper.deserialize(roleFactory, bb);
 
index 368aca40a68c8a79b1486f392c46b54d73fb3b1b..f33b0fa53d1d772bb0bfff19ba53b8ab657c4ba4 100644 (file)
@@ -22,8 +22,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev13
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.RoleRequestInput;
 
 /**
- * @author giuseppex.petralia@intel.com
+ * Unit tests for RoleRequestInputMessageFactory.
  *
+ * @author giuseppex.petralia@intel.com
  */
 public class RoleRequestInputMessageFactoryTest {
     private OFDeserializer<RoleRequestInput> factory;
index e5c1d9afa09d379cee1b5c9e86ad3fce10d631a4..672f0e9d4e8939e843a9b997584af155d0586db1 100644 (file)
@@ -31,8 +31,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.async.body.grouping.PortStatusMaskBuilder;
 
 /**
- * @author giuseppex.petralia@intel.com
+ * Unit tests for SetAsyncInputMessageFactory.
  *
+ * @author giuseppex.petralia@intel.com
  */
 public class SetAsyncInputMessageFactoryTest {
     private OFDeserializer<SetAsyncInput> factory;
@@ -69,7 +70,7 @@ public class SetAsyncInputMessageFactoryTest {
     }
 
     private static List<PacketInMask> createPacketInMask() {
-        List<PacketInMask> masks = new ArrayList<>();
+        final List<PacketInMask> masks = new ArrayList<>();
         PacketInMaskBuilder builder;
         // OFPCR_ROLE_EQUAL or OFPCR_ROLE_MASTER
         builder = new PacketInMaskBuilder();
@@ -88,7 +89,7 @@ public class SetAsyncInputMessageFactoryTest {
     }
 
     private static List<PortStatusMask> createPortStatusMask() {
-        List<PortStatusMask> masks = new ArrayList<>();
+        final List<PortStatusMask> masks = new ArrayList<>();
         PortStatusMaskBuilder builder;
         builder = new PortStatusMaskBuilder();
         // OFPCR_ROLE_EQUAL or OFPCR_ROLE_MASTER
@@ -107,7 +108,7 @@ public class SetAsyncInputMessageFactoryTest {
     }
 
     private static List<FlowRemovedMask> createFlowRemowedMask() {
-        List<FlowRemovedMask> masks = new ArrayList<>();
+        final List<FlowRemovedMask> masks = new ArrayList<>();
         FlowRemovedMaskBuilder builder;
         // OFPCR_ROLE_EQUAL or OFPCR_ROLE_MASTER
         builder = new FlowRemovedMaskBuilder();
index 3b63748ead875477904591144d49f4ac015b410f..771679420f4c3761d9df77b31e4ef092df2427e8 100644 (file)
@@ -22,8 +22,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev13
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.TableModInput;
 
 /**
- * @author giuseppex.petralia@intel.com
+ * Unit tests for TableModInputMessageFactory.
  *
+ * @author giuseppex.petralia@intel.com
  */
 public class TableModInputMessageFactoryTest {
 
index aaa94680c756f42b951bdb9a2649610ef6b998b4..b03664a55e0e2cc723e0fecd27a9ec961105a247 100644 (file)
@@ -21,8 +21,9 @@ import org.opendaylight.openflowjava.protocol.api.keys.MessageCodeKey;
 import org.opendaylight.openflowjava.util.ByteBufUtils;
 
 /**
- * @author michal.polkorab
+ * Unit tests for VendorMessageFactory.
  *
+ * @author michal.polkorab
  */
 @RunWith(MockitoJUnitRunner.class)
 public class VendorMessageFactoryTest {
@@ -31,7 +32,7 @@ public class VendorMessageFactoryTest {
     @Mock ExperimenterMessageFactory deserializer;
 
     /**
-     * Tests {@link VendorMessageFactory#deserialize(ByteBuf)}
+     * Tests {@link VendorMessageFactory#deserialize(ByteBuf)}.
      */
     @Test
     public void test() {
@@ -44,4 +45,4 @@ public class VendorMessageFactoryTest {
         Mockito.verify(deserializer, Mockito.times(1)).deserialize(buffer);
         Assert.assertEquals("Buffer index modified", 4, buffer.readableBytes());
     }
-}
\ No newline at end of file
+}