@Override
    public void write(int b) throws IOException {
        filePosition++;
        super.write(b);
    }
@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));
    }