### Question:
VirtualDirTgz extends VirtualDir { @Override public File getFile(String path) throws IOException { ensureUnpacked(); final File file = new File(extractDir, path); if (!(file.isFile() || file.isDirectory())) { throw new IOException(); } return file; } VirtualDirTgz(File tgz); @Override String getBasePath(); @Override InputStream getInputStream(String path); @Override File getFile(String path); @Override String[] list(String path); @Override void close(); @Override boolean isCompressed(); @Override boolean isArchive(); @Override void finalize(); File getTempDir();  }### Answer:
@Test public void testTar_noDirInTar_getFile() throws IOException { final File testTgz = TestUtil.getTestFile("tgz/test-archive_wo_dir.tar"); virtualDir = new VirtualDirTgz(testTgz); final File file_1 = virtualDir.getFile("file1.txt"); assertNotNull(file_1); }