#vulnerable code 
                                @Test
    public void testAvailable() throws IOException {
        final String s = "5\r\n12345\r\n0\r\n";
        final ChunkedInputStream in = new ChunkedInputStream(
                new SessionInputBufferMock(
                        EncodingUtils.getBytes(s, CONTENT_CHARSET)));
        Assert.assertEquals(0, in.available());
        in.read();
        Assert.assertEquals(4, in.available());
    } 
                            #location 9 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                @Test
    public void testAvailable() throws IOException {
        final String s = "5\r\n12345\r\n0\r\n";
        final ChunkedInputStream in = new ChunkedInputStream(
                new SessionInputBufferMock(
                        EncodingUtils.getBytes(s, CONTENT_CHARSET)));
        Assert.assertEquals(0, in.available());
        in.read();
        Assert.assertEquals(4, in.available());
        in.close();
    }