@Override
    public int available() throws IOException {
        return in.available() + bufferAvailable;
    }
@Test
    public void testAvailable() throws Exception {
        try (InputStream sample = new ByteArrayInputStream(sample1.getBytes());
                JsonArrayFixingInputStream instance = new JsonArrayFixingInputStream(sample)) {
            int results = instance.available();
            assertTrue(results > 0);
            String text = IOUtils.toString(instance, UTF_8);
            int i = instance.read();
            assertEquals(-1, i);
            //odd buffer is 0 and we've read to the end - but available on the underlying stream still says 3...
            //results = instance.available();
            //assertEquals(0, results);
        }
    }