@Test
public void testReadManifest() throws Exception {

    final File testPackage = TestPackageUtil.prepareTestPackage("null-dependency-test.zip");
    final CompletableFuture<Boolean> manifestWasRead = new CompletableFuture<>();
    ProgressCheck check = new SimpleProgressCheck() {
        @Override
        public void readManifest(final PackageId packageId, final Manifest manifest) {
            manifestWasRead.complete(Util.getManifestHeaderValues(manifest, "Content-Package-Id")
                    .contains("my_packages:null-dependency-test"));
        }
    };
    builder().withProgressChecks(check).withProgressChecks((ProgressCheck[]) null).build().scanPackage(testPackage);
    assertTrue("manifest was read, and produced correct value for Content-Package-Id",
            manifestWasRead.isDone() && manifestWasRead.get());
}