ZipFileData implements FileData { @Override public Path getPathWithinRoot() { return Paths.get(entry.getName()); } ZipFileData(ZipFile zipFile, ZipEntry entry); @Override @MustBeClosed InputStream getInputStream(); @Override Path getPathWithinRoot(); @Override Path getPathWithinModule(); @Override long getSize(); long getCompressedSize();  }
@Test public void givesPathWithinRoot() throws Exception { File bundleFile = TestUtils.getTestDataFile(APP_BUNDLE); try (ZipFile zipFile = new ZipFile(bundleFile)) { ZipEntry entry = zipFile.getEntry("base/manifest/AndroidManifest.xml"); ZipFileData data = new ZipFileData(zipFile, entry); assertThat((Object) data.getPathWithinRoot()) .isEqualTo(Paths.get("base/manifest/AndroidManifest.xml")); } }