@Test
public void hexCharToIntValue() throws Exception {

    Assert.assertEquals(0, HexUtil.hexCharToIntValue('0'));
    Assert.assertEquals(1, HexUtil.hexCharToIntValue('1'));
    Assert.assertEquals(2, HexUtil.hexCharToIntValue('2'));
    Assert.assertEquals(3, HexUtil.hexCharToIntValue('3'));
    Assert.assertEquals(4, HexUtil.hexCharToIntValue('4'));
    Assert.assertEquals(5, HexUtil.hexCharToIntValue('5'));
    Assert.assertEquals(6, HexUtil.hexCharToIntValue('6'));
    Assert.assertEquals(7, HexUtil.hexCharToIntValue('7'));
    Assert.assertEquals(8, HexUtil.hexCharToIntValue('8'));
    Assert.assertEquals(9, HexUtil.hexCharToIntValue('9'));
    Assert.assertEquals(10, HexUtil.hexCharToIntValue('A'));
    Assert.assertEquals(11, HexUtil.hexCharToIntValue('B'));
    Assert.assertEquals(12, HexUtil.hexCharToIntValue('C'));
    Assert.assertEquals(13, HexUtil.hexCharToIntValue('D'));
    Assert.assertEquals(14, HexUtil.hexCharToIntValue('E'));
    Assert.assertEquals(15, HexUtil.hexCharToIntValue('F'));
    Assert.assertEquals(10, HexUtil.hexCharToIntValue('a'));
    Assert.assertEquals(11, HexUtil.hexCharToIntValue('b'));
    Assert.assertEquals(12, HexUtil.hexCharToIntValue('c'));
    Assert.assertEquals(13, HexUtil.hexCharToIntValue('d'));
    Assert.assertEquals(14, HexUtil.hexCharToIntValue('e'));
    Assert.assertEquals(15, HexUtil.hexCharToIntValue('f'));
    try {
        Assert.assertEquals(15, HexUtil.hexCharToIntValue('g'));
        Assert.fail();
    } catch (IllegalArgumentException e) {
        // correct behavior
    }
}