+package net.jaekl.squelch.util;
+
+import static org.junit.Assert.assertEquals;
+import org.junit.Test;
+
+public class DatatypeConverterTest {
+ @Test
+ public void testPrintHexBinary() {
+ String[][] data = {
+ { "Hello, World", "48656c6c6f2c20576f726c64" },
+ { "日本語がわかりますか?", "e697a5e69cace8aa9ee3818ce3828fe3818be3828ae381bee38199e3818befbc9f" },
+ };
+
+ for (int i = 0; i < data.length; ++i) {
+ byte[] input = data[i][0].getBytes();
+ String expected = data[i][1];
+
+ assertEquals(expected, DatatypeConverter.printHexBinary(input));
+ }
+ }
+}
+