Fix checkstyle violations in openflow-protocol-impl - part 10
[openflowplugin.git] / openflowjava / openflow-protocol-impl / src / test / java / org / opendaylight / openflowjava / protocol / impl / deserialization / factories / multipart / MultipartReplyGroupFeaturesTest.java
index 5ac385c750f2fc9f459b12331b6bd0cc3b51e0d6..39cd8b39a09dff0026a653c44ca3d8c179210383 100644 (file)
@@ -9,7 +9,6 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.factories.multipart;
 
 import io.netty.buffer.ByteBuf;
-
 import org.junit.Assert;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.impl.deserialization.factories.MultipartReplyMessageFactory;
@@ -22,28 +21,29 @@ 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.group.features._case.MultipartReplyGroupFeatures;
 
 /**
- * @author michal.polkorab
+ * Unit tests for MultipartReplyGroupFeatures.
  *
+ * @author michal.polkorab
  */
 public class MultipartReplyGroupFeaturesTest {
 
-    private MultipartReplyMessageFactory factory = new MultipartReplyMessageFactory();
+    private final MultipartReplyMessageFactory factory = new MultipartReplyMessageFactory();
 
     /**
-     * Testing {@link MultipartReplyMessageFactory} for correct translation into POJO
+     * Testing {@link MultipartReplyMessageFactory} for correct translation into POJO.
      */
     @Test
     public void testMultipartReplyGroupFeatures() {
-        ByteBuf bb = BufferHelper.buildBuffer("00 08 00 01 00 00 00 00 "+
-                                              "00 00 00 0F "+// types
-                                              "00 00 00 0F "+// capabilities
-                                              "00 00 00 01 "+// max groups
-                                              "00 00 00 02 "+// max groups
-                                              "00 00 00 03 "+// max groups
-                                              "00 00 00 04 "+// max groups
-                                              "0F FF 98 01 "+// actions bitmap (all actions included)
-                                              "00 00 00 00 "+// actions bitmap (no actions included)
-                                              "00 00 00 00 "+// actions bitmap (no actions included)
+        ByteBuf bb = BufferHelper.buildBuffer("00 08 00 01 00 00 00 00 " + //
+                                              "00 00 00 0F " + // types
+                                              "00 00 00 0F " + // capabilities
+                                              "00 00 00 01 " + // max groups
+                                              "00 00 00 02 " + // max groups
+                                              "00 00 00 03 " + // max groups
+                                              "00 00 00 04 " + // max groups
+                                              "0F FF 98 01 " + // actions bitmap (all actions included)
+                                              "00 00 00 00 " + // actions bitmap (no actions included)
+                                              "00 00 00 00 " + // actions bitmap (no actions included)
                                               "00 00 00 00"// actions bitmap (no actions included)
                                               );
         MultipartReplyMessage builtByFactory = BufferHelper.deserialize(factory, bb);
@@ -61,32 +61,35 @@ public class MultipartReplyGroupFeaturesTest {
         Assert.assertEquals("Wrong max groups", 2, message.getMaxGroups().get(1).intValue());
         Assert.assertEquals("Wrong max groups", 3, message.getMaxGroups().get(2).intValue());
         Assert.assertEquals("Wrong max groups", 4, message.getMaxGroups().get(3).intValue());
-        Assert.assertEquals("Wrong actions bitmap", new ActionType(true, true, true, true, false, true, true, true, true,
-                true, true, true, true, true, true, true, true), message.getActionsBitmap().get(0));
-        Assert.assertEquals("Wrong actions bitmap", new ActionType(false, false, false, false, false, false, false, false,
-                false, false, false, false, false, false, false, false, false), message.getActionsBitmap().get(1));
-        Assert.assertEquals("Wrong actions bitmap", new ActionType(false, false, false, false, false, false, false, false,
-                false, false, false, false, false, false, false, false, false), message.getActionsBitmap().get(2));
-        Assert.assertEquals("Wrong actions bitmap", new ActionType(false, false, false, false, false, false, false, false,
-                false, false, false, false, false, false, false, false, false), message.getActionsBitmap().get(3));
+        Assert.assertEquals("Wrong actions bitmap", new ActionType(true, true, true, true, false, true, true, true,
+                true, true, true, true, true, true, true, true, true), message.getActionsBitmap().get(0));
+        Assert.assertEquals("Wrong actions bitmap", new ActionType(false, false, false, false, false, false, false,
+                false, false, false, false, false, false, false, false, false, false),
+                message.getActionsBitmap().get(1));
+        Assert.assertEquals("Wrong actions bitmap", new ActionType(false, false, false, false, false, false, false,
+                false, false, false, false, false, false, false, false, false, false),
+                message.getActionsBitmap().get(2));
+        Assert.assertEquals("Wrong actions bitmap", new ActionType(false, false, false, false, false, false, false,
+                false, false, false, false, false, false, false, false, false, false),
+                message.getActionsBitmap().get(3));
     }
 
     /**
      * Testing {@link MultipartReplyMessageFactory} for correct translation into POJO
-     * (with different group types and capabilities)
+     * (with different group types and capabilities).
      */
     @Test
     public void testMultipartReplyGroupFeatures2() {
-        ByteBuf bb = BufferHelper.buildBuffer("00 08 00 01 00 00 00 00 "+
-                                              "00 00 00 00 "+// types
-                                              "00 00 00 00 "+// capabilities
-                                              "00 00 00 01 "+// max groups
-                                              "00 00 00 02 "+// max groups
-                                              "00 00 00 03 "+// max groups
-                                              "00 00 00 04 "+// max groups
-                                              "00 00 00 00 "+// actions bitmap (all actions included)
-                                              "00 00 00 00 "+// actions bitmap (no actions included)
-                                              "00 00 00 00 "+// actions bitmap (no actions included)
+        ByteBuf bb = BufferHelper.buildBuffer("00 08 00 01 00 00 00 00 " + //
+                                              "00 00 00 00 " + // types
+                                              "00 00 00 00 " + // capabilities
+                                              "00 00 00 01 " + // max groups
+                                              "00 00 00 02 " + // max groups
+                                              "00 00 00 03 " + // max groups
+                                              "00 00 00 04 " + // max groups
+                                              "00 00 00 00 " + // actions bitmap (all actions included)
+                                              "00 00 00 00 " + // actions bitmap (no actions included)
+                                              "00 00 00 00 " + // actions bitmap (no actions included)
                                               "00 00 00 00"// actions bitmap (no actions included)
                                               );
         MultipartReplyMessage builtByFactory = BufferHelper.deserialize(factory, bb);
@@ -101,4 +104,4 @@ public class MultipartReplyGroupFeaturesTest {
         Assert.assertEquals("Wrong capabilities", new GroupCapabilities(false, false, false, false),
                 message.getCapabilities());
     }
-}
\ No newline at end of file
+}