@Test
public void readOffsetBuffer_validInputStream() throws IOException {

    final InputStream inputStream = createInputStream(TEST_BUFFER);
    byte[] buffer = new byte[1000];
    int offset = 0;
    int bytesRead;
    while ((bytesRead = inputStream.read(buffer, offset, 2)) != -1) {
        offset += bytesRead;
    }
}