PackageGraph implements ProgressCheck { public boolean isIdentified(final @NotNull PackageId packageId) { return identified.contains(packageId); }  @Override Collection<Violation> getReportedViolations(); @Override void startedScan(); @Override void identifyPackage(final PackageId packageId, final File file); @Override void identifySubpackage(final PackageId packageId, final PackageId parentId); @Override void identifyEmbeddedPackage(final PackageId packageId, final PackageId parentId,
                                        final EmbeddedPackageInstallable slingInstallable); boolean isIdentified(final @NotNull PackageId packageId); @Nullable PackageId getLastIdentified(); boolean isRoot(final @NotNull PackageId packageId); boolean isLeftDescendantOfRight(final @NotNull PackageId left, final @NotNull PackageId right); Collection<PackageId> getSelfAndAncestors(final @NotNull PackageId self); Collection<PackageId> getSelfAndDescendants(final @NotNull PackageId self);  }
@Test public void testIsIdentified() { for (PackageId id : scan1) { assertTrue("expect identified " + id, graph.isIdentified(id)); } for (PackageId id : scan2) { assertTrue("expect identified " + id, graph.isIdentified(id)); } graph.startedScan(); for (PackageId id : scan1) { assertFalse("expect not identified " + id, graph.isIdentified(id)); } for (PackageId id : scan2) { assertFalse("expect not identified " + id, graph.isIdentified(id)); } }