@Test
void testPutHexInt() {

    int[] val = {
            0, 42, 43, -44, -45, -2147483648, 2147483647
    };
    String[] str = {
            "0", "2A", "2B", "-2C", "-2D", "-80000000", "7FFFFFFF"
    };
    ByteBuffer buffer = ByteBuffer.allocate(50);
    for (int i = 0; i < val.length; i++) {
        BufferUtils.clearToFill(buffer);
        BufferUtils.putHexInt(buffer, val[i]);
        BufferUtils.flipToFlush(buffer, 0);
        assertEquals(str[i], BufferUtils.toString(buffer), "t" + i);
    }
}