### Question:
HexUniqueKeyFormatter extends BaseUniqueKeyFormatter implements UniqueKeyFormatter { @Override protected String encodeAsString(byte[] bytes) { return Hex.encodeHexString(bytes); }    }### Answer:
@Test public void testEncodeAsString_SimpeCase() { HexUniqueKeyFormatter formatter = new HexUniqueKeyFormatter(); assertEquals("010203ff", formatter.encodeAsString(new byte[] { 1, 2, 3, (byte)255 })); }