@Test
@SneakyThrows
void writeByteByByteChunked() {

    writeByteByByte(multipartChunkWithTail);
    tested.close();
    assertThat(bytesSentDirectly.getAllValues()).isEmpty();
    assertThat(uploadChunk.getAllValues()).hasSize(2);
    assertThat(uploadChunk.getAllValues().get(0).getInputStream())
            .hasContent(new String(Arrays.copyOfRange(multipartChunkWithTail, 0, BUFFER_SIZE)));
    // we are setting size parameter that limits number of bytes read by s3 client:
    int partialPartSize = (int) uploadChunk.getAllValues().get(1).getPartSize();
    byte[] partialChunk = new byte[partialPartSize];
    ByteStreams.readFully(uploadChunk.getAllValues().get(1).getInputStream(), partialChunk, 0, partialPartSize);
    assertThat(new String(partialChunk))
            .isEqualTo(new String(Arrays.copyOfRange(
                    multipartChunkWithTail, BUFFER_SIZE, multipartChunkWithTail.length)
                    )
            );
}