#fixed code
                                @Test
    public void testAvailable() throws IOException {
        final InputStream in = new ContentLengthInputStream(
                new SessionInputBufferMock(new byte[] {1, 2, 3}), 3L);
        Assert.assertEquals(0, in.available());
        in.read();
        Assert.assertEquals(2, in.available());
        in.close();
    }
#vulnerable code 
                                @Test
    public void testAvailable() throws IOException {
        final InputStream in = new ContentLengthInputStream(
                new SessionInputBufferMock(new byte[] {1, 2, 3}), 10L);
        Assert.assertEquals(0, in.available());
        in.read();
        Assert.assertEquals(2, in.available());
    } 
                            #location 7 
                            #vulnerability type RESOURCE_LEAK