assertNull(StringUtils.encodeHex(null));
BigInteger x = new BigInteger("10");
String uuid = "3b0ae7d419d26e36e040007f0101785c";
assertEquals("RAW 16", 16, StringUtils.encodeHex(uuid).length);
assertEquals("RAW 16", uuid, ByteUtils.toHex(StringUtils.encodeHex(uuid)));
assertTrue("Number has been converted", 10 == StringUtils.encodeHex(ByteUtils.toHex(x.toByteArray()))[0]);
String enc = "QCcyTE4v9EgCGo+kPGeI6LZ5XK0+3JLa7dC90DwKabHd9gtBd+/pJg==";
byte[] encbytes = enc.getBytes();
assertEquals("Encrypted data is treated ok", enc, new String(StringUtils.encodeHex(enc)));
assertEquals("Encrypted data is treated ok", encbytes.length, StringUtils.encodeHex(ByteUtils.toHex(encbytes)).length);
assertEquals("Encrypted data is treated ok", encbytes[0], StringUtils.encodeHex(ByteUtils.toHex(encbytes))[0]);