@Test
public void testAppliedRepoInitScripts() throws Exception {

    final PackageId arg0 = PackageId.fromString("my_packages:example:1.0");
    final List<String> arg1 = Collections.singletonList("one script");
    final SlingInstallable arg2 = mock(SlingInstallable.class);
    final Session arg3 = mock(Session.class);
    final CompletableFuture<PackageId> slot0 = new CompletableFuture<>();
    final CompletableFuture<List<?>> slot1 = new CompletableFuture<>();
    final CompletableFuture<SlingInstallable> slot2 = new CompletableFuture<>();
    final CompletableFuture<Session> slot3 = new CompletableFuture<>();
    final ProgressCheck delegate = mock(ProgressCheck.class);
    doAnswer(call -> {
        slot0.complete(call.getArgument(0, PackageId.class));
        slot1.complete(call.getArgument(1, List.class));
        slot2.complete(call.getArgument(2, SlingInstallable.class));
        slot3.complete(call.getArgument(3, Session.class));
        return true;
    }).when(delegate).appliedRepoInitScripts(
            any(PackageId.class),
            any(List.class),
            any(SlingInstallable.class),
            any(Session.class));
    final ProgressCheckAliasFacade alias = new ProgressCheckAliasFacade(delegate, null);
    alias.appliedRepoInitScripts(arg0, arg1, arg2, arg3);
    assertSame("same arg0", arg0, slot0.getNow(null));
    assertSame("same arg1", arg1, slot1.getNow(null));
    assertSame("same arg2", arg2, slot2.getNow(null));
    assertSame("same arg3", arg3, slot3.getNow(null));
}