Removed checkstyle warnings.
[bgpcep.git] / bgp / util / src / test / java / org / opendaylight / protocol / bgp / util / BGPHexFileParserTest.java
index 3169a1f32a3388c338ba49f49103112e68c67d21..fa5c2df96cc51169bad130641bdb38f68f2fdaa5 100644 (file)
@@ -20,40 +20,41 @@ import org.junit.Test;
 
 public class BGPHexFileParserTest {
 
-       public static final String hexDumpFileName = "bgp_hex.txt";
-       private final String fileNameInvalid = "BgpMessage_Hex_InvalidLength.bin";
-       private final int expectedSize = 25;
-
-       @Test
-       public void testCleanWhiteSpace() {
-               final String input = "abc def\r\nghi\nj";
-               assertEquals("ABCDEFGHIJ", HexDumpBGPFileParser.clearWhiteSpaceToUpper(input));
-       }
-
-       @Test
-       public void testParsing() throws Exception {
-               final List<byte[]> result = HexDumpBGPFileParser.parseMessages(getClass().getClassLoader().getResourceAsStream(BGPHexFileParserTest.hexDumpFileName));
-               assertEquals(this.expectedSize, result.size());
-       }
-
-       @Test
-       public void testParsingInvalidMessage() throws Exception {
-               try {
-                       HexDumpBGPFileParser.parseMessages(getClass().getClassLoader().getResourceAsStream(this.fileNameInvalid));
-                       fail("Exception should have occured.");
-               } catch (final IllegalArgumentException e) {
-                       assertThat(e.getMessage(), containsString("Invalid message at index 0, length atribute is lower than 19"));
-               }
-       }
-
-       @Test
-       public void testParsingInvalidFile() throws Exception {
-               try {
-                       HexDumpBGPFileParser.parseMessages(new File("bad file name"));
-                       fail("Exception should have occured.");
-               } catch (final FileNotFoundException e) {
-                       assertThat(e.getMessage(), containsString("bad file name"));
-               }
-       }
+    public static final String hexDumpFileName = "bgp_hex.txt";
+    private final String fileNameInvalid = "BgpMessage_Hex_InvalidLength.bin";
+    private final int expectedSize = 25;
+
+    @Test
+    public void testCleanWhiteSpace() {
+        final String input = "abc def\r\nghi\nj";
+        assertEquals("ABCDEFGHIJ", HexDumpBGPFileParser.clearWhiteSpaceToUpper(input));
+    }
+
+    @Test
+    public void testParsing() throws Exception {
+        final List<byte[]> result = HexDumpBGPFileParser.parseMessages(getClass().getClassLoader().getResourceAsStream(
+                BGPHexFileParserTest.hexDumpFileName));
+        assertEquals(this.expectedSize, result.size());
+    }
+
+    @Test
+    public void testParsingInvalidMessage() throws Exception {
+        try {
+            HexDumpBGPFileParser.parseMessages(getClass().getClassLoader().getResourceAsStream(this.fileNameInvalid));
+            fail("Exception should have occured.");
+        } catch (final IllegalArgumentException e) {
+            assertThat(e.getMessage(), containsString("Invalid message at index 0, length atribute is lower than 19"));
+        }
+    }
+
+    @Test
+    public void testParsingInvalidFile() throws Exception {
+        try {
+            HexDumpBGPFileParser.parseMessages(new File("bad file name"));
+            fail("Exception should have occured.");
+        } catch (final FileNotFoundException e) {
+            assertThat(e.getMessage(), containsString("bad file name"));
+        }
+    }
 
 }