@SuppressWarnings("NumericCastThatLosesPrecision")
@Test
public void testHexByteArray() {

    LOG.info("testHexByteArray");
    Assert.assertArrayEquals(new byte[]{(byte) 0}, HexString.getHexByteArray("0"));
    Assert.assertArrayEquals(new byte[]{(byte) 1}, HexString.getHexByteArray("1"));
    Assert.assertArrayEquals(new byte[]{(byte) 2}, HexString.getHexByteArray("2"));
    Assert.assertArrayEquals(new byte[]{(byte) 3}, HexString.getHexByteArray("3"));
    Assert.assertArrayEquals(new byte[]{(byte) 4}, HexString.getHexByteArray("4"));
    Assert.assertArrayEquals(new byte[]{(byte) 5}, HexString.getHexByteArray("5"));
    Assert.assertArrayEquals(new byte[]{(byte) 6}, HexString.getHexByteArray("6"));
    Assert.assertArrayEquals(new byte[]{(byte) 7}, HexString.getHexByteArray("7"));
    Assert.assertArrayEquals(new byte[]{(byte) 8}, HexString.getHexByteArray("8"));
    Assert.assertArrayEquals(new byte[]{(byte) 9}, HexString.getHexByteArray("9"));
    Assert.assertArrayEquals(new byte[]{(byte) 10}, HexString.getHexByteArray("a"));
    Assert.assertArrayEquals(new byte[]{(byte) 11}, HexString.getHexByteArray("b"));
    Assert.assertArrayEquals(new byte[]{(byte) 12}, HexString.getHexByteArray("c"));
    Assert.assertArrayEquals(new byte[]{(byte) 13}, HexString.getHexByteArray("d"));
    Assert.assertArrayEquals(new byte[]{(byte) 14}, HexString.getHexByteArray("e"));
    Assert.assertArrayEquals(new byte[]{(byte) 15}, HexString.getHexByteArray("f"));
    Assert.assertArrayEquals(new byte[]{(byte) 10}, HexString.getHexByteArray("0A"));
    Assert.assertArrayEquals(new byte[]{(byte) 10}, HexString.getHexByteArray("0a"));
    Assert.assertArrayEquals(new byte[]{(byte) 0}, HexString.getHexByteArray("00"));
    Assert.assertArrayEquals(new byte[]{(byte) 1}, HexString.getHexByteArray("01"));
    Assert.assertArrayEquals(new byte[]{(byte) 2}, HexString.getHexByteArray("02"));
    Assert.assertArrayEquals(new byte[]{(byte) 3}, HexString.getHexByteArray("03"));
    Assert.assertArrayEquals(new byte[]{(byte) 4}, HexString.getHexByteArray("04"));
    Assert.assertArrayEquals(new byte[]{(byte) 5}, HexString.getHexByteArray("05"));
    Assert.assertArrayEquals(new byte[]{(byte) 6}, HexString.getHexByteArray("06"));
    Assert.assertArrayEquals(new byte[]{(byte) 7}, HexString.getHexByteArray("07"));
    Assert.assertArrayEquals(new byte[]{(byte) 8}, HexString.getHexByteArray("08"));
    Assert.assertArrayEquals(new byte[]{(byte) 9}, HexString.getHexByteArray("09"));
    Assert.assertArrayEquals(new byte[]{(byte) 10}, HexString.getHexByteArray("0a"));
    Assert.assertArrayEquals(new byte[]{(byte) 11}, HexString.getHexByteArray("0b"));
    Assert.assertArrayEquals(new byte[]{(byte) 12}, HexString.getHexByteArray("0c"));
    Assert.assertArrayEquals(new byte[]{(byte) 13}, HexString.getHexByteArray("0d"));
    Assert.assertArrayEquals(new byte[]{(byte) 14}, HexString.getHexByteArray("0e"));
    Assert.assertArrayEquals(new byte[]{(byte) 15}, HexString.getHexByteArray("0f"));
    Assert.assertArrayEquals(new byte[]{(byte) 0, (byte) 0}, HexString.getHexByteArray("000"));
    Assert.assertArrayEquals(new byte[]{(byte) 0, (byte) 1}, HexString.getHexByteArray("001"));
    Assert.assertArrayEquals(new byte[]{(byte) 0, (byte) 2}, HexString.getHexByteArray("002"));
    Assert.assertArrayEquals(new byte[]{(byte) 0, (byte) 3}, HexString.getHexByteArray("003"));
    Assert.assertArrayEquals(new byte[]{(byte) 0, (byte) 4}, HexString.getHexByteArray("004"));
    Assert.assertArrayEquals(new byte[]{(byte) 0, (byte) 5}, HexString.getHexByteArray("005"));
    Assert.assertArrayEquals(new byte[]{(byte) 0, (byte) 6}, HexString.getHexByteArray("006"));
    Assert.assertArrayEquals(new byte[]{(byte) 0, (byte) 7}, HexString.getHexByteArray("007"));
    Assert.assertArrayEquals(new byte[]{(byte) 0, (byte) 8}, HexString.getHexByteArray("008"));
    Assert.assertArrayEquals(new byte[]{(byte) 0, (byte) 9}, HexString.getHexByteArray("009"));
    Assert.assertArrayEquals(new byte[]{(byte) 0, (byte) 10}, HexString.getHexByteArray("00a"));
    Assert.assertArrayEquals(new byte[]{(byte) 0, (byte) 11}, HexString.getHexByteArray("00b"));
    Assert.assertArrayEquals(new byte[]{(byte) 0, (byte) 12}, HexString.getHexByteArray("00c"));
    Assert.assertArrayEquals(new byte[]{(byte) 0, (byte) 13}, HexString.getHexByteArray("00d"));
    Assert.assertArrayEquals(new byte[]{(byte) 0, (byte) 14}, HexString.getHexByteArray("00e"));
    Assert.assertArrayEquals(new byte[]{(byte) 0, (byte) 15}, HexString.getHexByteArray("00f"));
    Assert.assertArrayEquals(new byte[]{(byte) 10}, HexString.getHexByteArray("0A"));
    Assert.assertArrayEquals(new byte[]{(byte) 10}, HexString.getHexByteArray("a"));
    Assert.assertArrayEquals(new byte[]{(byte) 255}, HexString.getHexByteArray("ff"));
    Assert.assertArrayEquals(new byte[]{(byte) 65}, HexString.getHexByteArray("41"));
    Assert.assertArrayEquals(new byte[]{(byte) 65, (byte) 66}, HexString.getHexByteArray("4142"));
}