@Test
public void appendHexStringWithByte() throws Exception {

    StringBuilder s0 = new StringBuilder(2);
    HexUtil.appendHexString(s0, (byte)0x65);
    Assert.assertEquals("65", s0.toString());
    // this appends the next byte
    HexUtil.appendHexString(s0, (byte)0x34);
    Assert.assertEquals("6534", s0.toString());
    s0.setLength(0);
    HexUtil.appendHexString(s0, (byte)0x00);
    Assert.assertEquals("00", s0.toString());
    s0.setLength(0);
    HexUtil.appendHexString(s0, (byte)-1);
    Assert.assertEquals("FF", s0.toString());
}