@Test
public void testIdentifyEmbeddedPackage() {

    final PackageId arg0 = PackageId.fromString("my_packages:example:1.0");
    final PackageId arg1 = PackageId.fromString("my_packages:other_example:1.0");
    final EmbeddedPackageInstallable arg2 = new EmbeddedPackageInstallable(arg0, "/some/path", arg1);
    final CompletableFuture<PackageId> slot0 = new CompletableFuture<>();
    final CompletableFuture<PackageId> slot1 = new CompletableFuture<>();
    final CompletableFuture<EmbeddedPackageInstallable> slot2 = new CompletableFuture<>();
    final ProgressCheck delegate = mock(ProgressCheck.class);
    doAnswer(call -> {
        slot0.complete(call.getArgument(0, PackageId.class));
        slot1.complete(call.getArgument(1, PackageId.class));
        slot2.complete(call.getArgument(2, EmbeddedPackageInstallable.class));
        return true;
    }).when(delegate).identifyEmbeddedPackage(
            any(PackageId.class),
            any(PackageId.class),
            any(EmbeddedPackageInstallable.class));
    final SilencingCheckFacade alias = new SilencingCheckFacade(delegate);
    alias.setSilenced(true);
    alias.identifyEmbeddedPackage(arg0, arg1, arg2);
    assertFalse("arg0 should not be done", slot0.isDone());
    assertFalse("arg1 should not be done", slot1.isDone());
    assertFalse("arg2 should not be done", slot2.isDone());
    alias.setSilenced(false);
    alias.identifyEmbeddedPackage(arg0, arg1, arg2);
    assertSame("same arg0", arg0, slot0.getNow(null));
    assertSame("same arg1", arg1, slot1.getNow(null));
    assertSame("same arg2", arg2, slot2.getNow(null));
}