@Test
public void testWriteByteArrayWithLengthAndOffset() throws IOException {

    byte[] arr = new byte[345];
    random.nextBytes(arr);
    writer.write(arr, 10, 300);
    expectData(Arrays.copyOfRange(arr, 10, 310));
}