#fixed code
                                @Test
    public void testConstructors() throws Exception {
        final ContentLengthInputStream in = new ContentLengthInputStream(
                new SessionInputBufferMock(new byte[] {}), 0);
        in.close();
        try {
            new ContentLengthInputStream(null, 10);
            Assert.fail("IllegalArgumentException should have been thrown");
        } catch (final IllegalArgumentException ex) {
            // expected
        }
        try {
            new ContentLengthInputStream(new SessionInputBufferMock(new byte[] {}), -10);
            Assert.fail("IllegalArgumentException should have been thrown");
        } catch (final IllegalArgumentException ex) {
            // expected
        }
    }
#vulnerable code 
                                @Test
    public void testConstructors() throws Exception {
        new ContentLengthInputStream(new SessionInputBufferMock(new byte[] {}), 10);
        try {
            new ContentLengthInputStream(null, 10);
            Assert.fail("IllegalArgumentException should have been thrown");
        } catch (final IllegalArgumentException ex) {
            // expected
        }
        try {
            new ContentLengthInputStream(new SessionInputBufferMock(new byte[] {}), -10);
            Assert.fail("IllegalArgumentException should have been thrown");
        } catch (final IllegalArgumentException ex) {
            // expected
        }
    } 
                            #location 3 
                            #vulnerability type RESOURCE_LEAK