@Test
public void shouldReadThreeBytes() throws IOException {

    byte[] bytes = ByteUtils.hexStringToByteArray("af66b1");
    ByteArrayInputStream stream = new ByteArrayInputStream(bytes);
    byte[] buffer = new byte[3];
    int read = StreamUtils.read(stream, buffer);
    Assert.assertEquals(3, read);
    Assert.assertEquals(3, buffer.length);
    Assert.assertEquals("af66b1", ByteUtils.toHexString(buffer));
}