ZipUtils { public void unzipArchive(final String archive, final String outputDir) throws IOException { unzipArchive( new File(archive), new File(outputDir) ); } ZipUtils(String encoding); void unzipArchive(final String archive, final String outputDir); void unzipArchive(final File archive, final File outputDir);  }
@Test public void testUnzipArchive() throws Exception { (new ZipUtils("Cp866")).unzipArchive( "src/test/resources/archive/testfile.zip", "target/test-classes/import/archive" ); File [] files = (new File("target/test-classes/import/archive")).listFiles(); boolean found = false; for (File file : files) { if (file.getAbsolutePath().contains("Привет, я файло.txt")) { found = true; break; } } assertTrue(found); }