@Override
    public int read() throws IOException {
        if (advanceStream()) {
            final int value = buffer[bufferStart];
            incrementRead();
            return value;
        }
        return -1;
    }
@Test
    public void testRead_byteArr() throws Exception {
        byte[] b = new byte[9];
        try (InputStream sample = new ByteArrayInputStream(sample2.getBytes());
                JsonArrayFixingInputStream instance = new JsonArrayFixingInputStream(sample)) {
            int read = instance.read(b);
            assertEquals(2, read);
            assertEquals('[', b[0]);
            assertEquals('{', b[1]);

            read = instance.read(b);
            assertEquals(1, read);
            assertEquals('}', b[0]);

            read = instance.read(b);
            assertEquals(2, read);
            assertEquals(',', b[0]);
            assertEquals('{', b[1]);

            read = instance.read(b);
            assertEquals(1, read);
            assertEquals('}', b[0]);

            read = instance.read(b);
            assertEquals(1, read);
            assertEquals(']', b[0]);
        }
    }