### Question:
RelativeFiles { @NonNull public static ImmutableSet<RelativeFile> fromZip(@NonNull File zip) throws IOException { Preconditions.checkArgument(zip.isFile(), "!zip.isFile(): %s", zip); Set<RelativeFile> files = Sets.newHashSet(); try (ZFile zipReader = ZFile.openReadOnly(zip)) { for (StoredEntry entry : zipReader.entries()) { if (entry.getType() == StoredEntryType.FILE) { files.add(new RelativeFile(zip, entry.getCentralDirectoryHeader().getName())); } } } return ImmutableSet.copyOf(files); } private  RelativeFiles(); @NonNull static ImmutableSet<RelativeFile> fromDirectory(@NonNull File directory); @NonNull static ImmutableSet<RelativeFile> fromDirectory(
            @NonNull File directory,
            @NonNull final Predicate<RelativeFile> filter); @NonNull static Predicate<RelativeFile> fromPathPredicate(@NonNull Predicate<String> predicate); @NonNull static ImmutableSet<RelativeFile> fromZip(@NonNull File zip);  }### Answer:
@Test public void readFullZip() throws Exception { File zfile = new File(temporaryFolder.getRoot(), "zf.zip"); try (ZFile zf = ZFile.openReadWrite(zfile)) { zf.add("file1", new ByteArrayInputStream(new byte[0])); zf.add("dir/", new ByteArrayInputStream(new byte[0])); zf.add("dir/file2", new ByteArrayInputStream(new byte[0])); } Set<RelativeFile> relativeFiles = RelativeFiles.fromZip(zfile); assertEquals(2, relativeFiles.size()); assertThat(relativeFiles).contains(new RelativeFile(zfile, "file1")); assertThat(relativeFiles).contains(new RelativeFile(zfile, "dir/file2")); }