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

        try (InputStream sample = new ByteArrayInputStream(sample2.getBytes());
                JsonArrayFixingInputStream instance = new JsonArrayFixingInputStream(sample)) {
            assertEquals('[', instance.read());
            assertEquals('{', instance.read());
            assertEquals('}', instance.read());
            assertEquals(',', instance.read());
            assertEquals('{', instance.read());
            assertEquals('}', instance.read());
            assertEquals(']', instance.read());
            assertEquals(-1, instance.read());
        }
    }