#vulnerable code 
                                @Test
    public void testFlush() throws IOException {
        final OutputStream out = EasyMock.createMock(OutputStream.class);
        out.flush(); // expect the flush to come through to the mocked OutputStream
        out.close();
        replay(out);

        final LoggerOutputStream los = new LoggerOutputStream(out, getExtendedLogger(), LEVEL);
        los.flush();
        los.close();
        verify(out);
    } 
                            #location 10 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                @Test
    public void testFlush() throws IOException {
        final OutputStream out = EasyMock.createMock(OutputStream.class);
        out.flush(); // expect the flush to come through to the mocked OutputStream
        out.close();
        replay(out);

        final LoggerFilterOutputStream los = new LoggerFilterOutputStream(out, getExtendedLogger(), LEVEL);
        los.flush();
        los.close();
        verify(out);
    }