Bmp TlvUtilTest fix
[bgpcep.git] / bgp / bmp-spi / src / test / java / org / opendaylight / protocol / bmp / spi / parser / TlvUtilTest.java
index c115ca654f7e444554bc6e63cc3dd7f2b1149755..85ee37b79f06cc8189bf65f073253904ffbd1cf2 100644 (file)
@@ -68,7 +68,7 @@ public class TlvUtilTest {
     @Test
     public void testFormatTlvASCII() throws Exception {
         final ByteBuf out = Unpooled.buffer(TLV_ASCII_OUT.length);
-        TlvUtil.formatTlvUtf8(1, "Name", out);
+        TlvUtil.formatTlvAscii(1, "Name", out);
         Assert.assertArrayEquals(TLV_ASCII_OUT, ByteArray.getAllBytes(out));
     }
 
@@ -82,4 +82,15 @@ public class TlvUtilTest {
             throw e.getCause();
         }
     }
+
+    @Test(expected=UnsupportedOperationException.class)
+    public void testTlvUtilPrivateConstructor() throws Throwable {
+        final Constructor<TlvUtil> c = TlvUtil.class.getDeclaredConstructor();
+        c.setAccessible(true);
+        try {
+            c.newInstance();
+        } catch (final InvocationTargetException e) {
+            throw e.getCause();
+        }
+    }
 }
\ No newline at end of file