#vulnerable code 
                                @Test
    public void testRoot() throws IOException {
        CompoundDocument document = createTestDocument();

        Entry root = document.getRootEntry();

        assertNotNull(root);
        assertEquals("Root Entry", root.getName());
        assertTrue(root.isRoot());
        assertFalse(root.isFile());
        assertFalse(root.isDirectory());
        assertEquals(0, root.length());
        assertNull(root.getInputStream());
    } 
                            #location 13 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                @Test
    public void testRoot() throws IOException {
        try (CompoundDocument document = createTestDocument()) {
            Entry root = document.getRootEntry();

            assertNotNull(root);
            assertEquals("Root Entry", root.getName());
            assertTrue(root.isRoot());
            assertFalse(root.isFile());
            assertFalse(root.isDirectory());
            assertEquals(0, root.length());
            assertNull(root.getInputStream());
        }
    }