@Test
public void testFinalize() throws Throwable {

    final File testTgz = TestUtil.getTestFile("tgz/test-archive.tgz");
    virtualDir = new VirtualDirTgz(testTgz);
    assertExpectedFile("test-archive/dir1/file3.txt");
    final File tempDir = virtualDir.getTempDir();
    assertNotNull(tempDir);
    assertTrue(tempDir.isDirectory());
    virtualDir.finalize();
    assertFalse(tempDir.isDirectory());
}