ArchiveFile { public ArchiveFile(final byte[] content) throws IOException { final ZipInputStream zip = new ZipInputStream(new ByteArrayInputStream(content)); ZipEntry zipEntry; while ((zipEntry = zip.getNextEntry()) != null) { archiveEntries.add(zipEntry); } } ArchiveFile(final byte[] content); List<ZipEntry> getEntries();  }
@Test public void testArchiveFile() throws Exception { byte[] content = new byte[]{ 80, 75, 3, 4, 20, 0, 2, 0, 8, 0, 17, 12, 2, 53, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 97, 3, 0, 80, 75, 1, 2, 20, 0, 20, 0, 2, 0, 8, 0, 17, 12, 2, 53, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 97, 80, 75, 5, 6, 0, 0, 0, 0, 1, 0, 1, 0, 47, 0, 0, 0, 33, 0, 0, 0, 0, 0 }; final ArchiveFile file = new ArchiveFile(content); assertEquals(1, file.getEntries().size()); }