Merge "Remove redundant exception declarations"
[openflowplugin.git] / libraries / liblldp / src / test / java / org / opendaylight / openflowplugin / libraries / liblldp / LLDPTLVTest.java
index 6f19a49281581cdad78078a09d7ee6dd2f29778f..a333d5d89fd9bed9684bd2e694f5cfe29347d43b 100644 (file)
@@ -7,22 +7,19 @@
  */
 package org.opendaylight.openflowplugin.libraries.liblldp;
 
+import com.google.common.io.BaseEncoding;
+import com.google.common.primitives.Bytes;
 import org.junit.Assert;
 import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.common.io.BaseEncoding;
-import com.google.common.primitives.Bytes;
-
-/**
- *
- */
+@SuppressWarnings("checkstyle:AbbreviationAsWordInName")
 public class LLDPTLVTest {
 
-    /** dummy custom tlv value */
+    /** dummy custom tlv value. */
     private static final String CUSTOM_TLV_ULTIMATE = "What do you get when you multiply 6 by 9?";
-    /** dummy custom tlv value in binary form */
+    /** dummy custom tlv value in binary form. */
     private static final byte[] CUSTOM_TLV_ULTIMATE_BIN = new byte[] {
         0x57, 0x68, 0x61, 0x74, 0x20, 0x64, 0x6f, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x67, 0x65, 0x74,
         0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x6d, 0x75, 0x6c, 0x74, 0x69,
@@ -41,14 +38,14 @@ public class LLDPTLVTest {
         byte[] tlv = LLDPTLV.createCustomTLVValue(CUSTOM_TLV_ULTIMATE);
 
         byte[] expectedCustomTlv = Bytes.concat(new byte[] {
-                // custom type (7b) + length (9b) = 16b = 2B  (skipped)
-                // 0x7f, 24,
-                // openflow OUI
-                0x00, 0x26, (byte) 0xe1,
-                // subtype
-                0x00},
-                // custom value
-                CUSTOM_TLV_ULTIMATE_BIN);
+            // custom type (7b) + length (9b) = 16b = 2B  (skipped)
+            // 0x7f, 24,
+            // openflow OUI
+            0x00, 0x26, (byte) 0xe1,
+            // subtype
+            0x00},
+            // custom value
+            CUSTOM_TLV_ULTIMATE_BIN);
 
         BaseEncoding be = BaseEncoding.base16().withSeparator(" ", 2).lowerCase();
         LOG.debug("expected: {}", be.encode(expectedCustomTlv));
@@ -58,21 +55,19 @@ public class LLDPTLVTest {
 
     /**
      * Test method for
-     * {@link org.opendaylight.openflowplugin.libraries.liblldp.LLDPTLV#getCustomString(byte[], int)}
-     * .
-     * @throws Exception
+     * {@link org.opendaylight.openflowplugin.libraries.liblldp.LLDPTLV#getCustomString(byte[], int)}.
      */
     @Test
-    public void testGetCustomString() throws Exception {
+    public void testGetCustomString() {
         byte[] inputCustomTlv = Bytes.concat(new byte[] {
-                // custom type (7b) + length (9b) = 16b = 2B  (skipped)
-                // 0x7f, 24,
-                // openflow OUI
-                0x00, 0x26, (byte) 0xe1,
-                // subtype
-                0x00},
-                // custom value
-                CUSTOM_TLV_ULTIMATE_BIN);
+            // custom type (7b) + length (9b) = 16b = 2B  (skipped)
+            // 0x7f, 24,
+            // openflow OUI
+            0x00, 0x26, (byte) 0xe1,
+            // subtype
+            0x00},
+            // custom value
+            CUSTOM_TLV_ULTIMATE_BIN);
 
         String actual = LLDPTLV.getCustomString(inputCustomTlv, inputCustomTlv.length);
         LOG.debug("actual custom TLV value as string: {}", actual);