@Test
public void testBasicWrite() throws IOException {

    for (int i = 0; i < INITIAL_SIZE; ++i) {
        stream.write(i);
    }
    final byte[] chunk = assertFinishedStream(INITIAL_SIZE, 1).get(0);
    assertEquals(INITIAL_SIZE, chunk.length);
    for (int i = 0; i < INITIAL_SIZE; ++i) {
        assertEquals((byte) i, chunk[i]);
    }
}