    public void testEncodeDecode() {
        byte[] bytes = new byte[256];
        new Random(1L).nextBytes(bytes);
        final String encodedBytes = HexDecoder.encode(bytes);
        assertEquals(
                "Bad encoded data",
                "73d51abbd89cb8196f0efb6892f94d68fccc2c35f0b84609e5f12c55dd85aba8d5d9bef76808f3b572e5900112b81927ba5bb5f67e1bda28b4049bf0e4aed78db15d7bf2fc0c34e9a99de4ef3bc2b17c8137ad659878f9e93df1f658367aca286452474b9ef3765e24e9a88173724dddfb04b01dcceb0c8aead641c58dad569581baeea87c10d40a47902028e61cfdc243d9d16008aabc9fb77cc723a56017e14f1ce8b1698341734a6823ce02043e016b544901214a2ddab82fec85c0b9fe0549c475be5b887bb4b8995b24fb5c6846f88b527b4f9d4c1391f1678b23ba4f9c9cd7bc93eb5776f4f03675344864294661c5949faf17b130fcf6482f971a5500",
                encodedBytes);
        final byte[] decodedBytes = HexDecoder.decode(encodedBytes);
        assertTrue("Bad decoded bytes", Arrays.equals(bytes, decodedBytes));
    }

    public void testEncodeDecode() {
        byte[] bytes = new byte[256];
        new Random(1L).nextBytes(bytes);
        final String encodedBytes = HexDecoder.encode(bytes);
        assertEquals(
                "Bad encoded data",
                "73D51ABBD89CB8196F0EFB6892F94D68FCCC2C35F0B84609E5F12C55DD85ABA8D5D9BEF76808F3B572E5900112B81927BA5BB5F67E1BDA28B4049BF0E4AED78DB15D7BF2FC0C34E9A99DE4EF3BC2B17C8137AD659878F9E93DF1F658367ACA286452474B9EF3765E24E9A88173724DDDFB04B01DCCEB0C8AEAD641C58DAD569581BAEEA87C10D40A47902028E61CFDC243D9D16008AABC9FB77CC723A56017E14F1CE8B1698341734A6823CE02043E016B544901214A2DDAB82FEC85C0B9FE0549C475BE5B887BB4B8995B24FB5C6846F88B527B4F9D4C1391F1678B23BA4F9C9CD7BC93EB5776F4F03675344864294661C5949FAF17B130FCF6482F971A5500",
                encodedBytes);
        final byte[] decodedBytes = HexDecoder.decode(encodedBytes);
        assertTrue("Bad decoded bytes", Arrays.equals(bytes, decodedBytes));
    }
