### Question:
VirtualDirTgz extends VirtualDir { static boolean isTgz(String filename) { final String extension = FileUtils.getExtension(filename); return (".tgz".equals(extension) || ".gz".equals(extension)); } 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 testIsTgz() { assertTrue(VirtualDirTgz.isTgz("test_archive.tar.gz")); assertTrue(VirtualDirTgz.isTgz("test_archive.tgz")); assertFalse(VirtualDirTgz.isTgz("test_archive.tar")); assertFalse(VirtualDirTgz.isTgz("test_archive.exe")); assertFalse(VirtualDirTgz.isTgz("test_archive")); }