public static int readUint16(ByteBuffer buf) throws BufferUnderflowException {
        return Short.toUnsignedInt(buf.order(ByteOrder.LITTLE_ENDIAN).getShort());
    }
@Test(expected = ArrayIndexOutOfBoundsException.class)
    public void testReadUint16ThrowsException3() {
        ByteUtils.readUint16(new byte[]{1, 2, 3}, -1);
    }