@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)); }
@Override public void appliedRepoInitScripts(final PackageId scanPackageId, final List<String> scripts, final SlingInstallable slingInstallable, final Session inspectSession) throws RepositoryException { wrapped.appliedRepoInitScripts(scanPackageId, scripts, slingInstallable, inspectSession); }
ProgressCheckAliasFacade implements SilenceableCheck { @Override public void appliedRepoInitScripts(final PackageId scanPackageId, final List<String> scripts, final SlingInstallable slingInstallable, final Session inspectSession) throws RepositoryException { wrapped.appliedRepoInitScripts(scanPackageId, scripts, slingInstallable, inspectSession); } }
ProgressCheckAliasFacade implements SilenceableCheck { @Override public void appliedRepoInitScripts(final PackageId scanPackageId, final List<String> scripts, final SlingInstallable slingInstallable, final Session inspectSession) throws RepositoryException { wrapped.appliedRepoInitScripts(scanPackageId, scripts, slingInstallable, inspectSession); } ProgressCheckAliasFacade(final @NotNull ProgressCheck wrapped,
                             final @Nullable String alias); }
ProgressCheckAliasFacade implements SilenceableCheck { @Override public void appliedRepoInitScripts(final PackageId scanPackageId, final List<String> scripts, final SlingInstallable slingInstallable, final Session inspectSession) throws RepositoryException { wrapped.appliedRepoInitScripts(scanPackageId, scripts, slingInstallable, inspectSession); } ProgressCheckAliasFacade(final @NotNull ProgressCheck wrapped,
                             final @Nullable String alias); @Override String getCheckName(); @Override @Nullable String getResourceBundleBaseName(); @Override void setResourceBundle(final ResourceBundle resourceBundle); @Override Collection<Violation> getReportedViolations(); @Override void startedScan(); @Override void setSilenced(final boolean silenced); @Override void simulateSling(final SlingSimulator slingSimulator, final Set<String> runModes); @Override void identifyPackage(final PackageId packageId, final File file); @Override void readManifest(final PackageId packageId, final Manifest manifest); @Override void beforeExtract(final PackageId packageId, final Session inspectSession,
                              final PackageProperties packageProperties, final MetaInf metaInf,
                              final List<PackageId> subpackages); @Override void importedPath(final PackageId packageId, final String path, final Node node,
                             final PathAction action); @Override void deletedPath(final PackageId packageId, final String path, final Session inspectSession); @Override void afterExtract(final PackageId packageId, final Session inspectSession); @Override void identifySubpackage(final PackageId packageId, final PackageId parentId); @Override void beforeSlingInstall(final PackageId scanPackageId,
                                   final SlingInstallable slingInstallable,
                                   final Session inspectSession); @Override void identifyEmbeddedPackage(final PackageId packageId,
                                        final PackageId parentId,
                                        final EmbeddedPackageInstallable slingInstallable); @Override void appliedRepoInitScripts(final PackageId scanPackageId,
                                       final List<String> scripts,
                                       final SlingInstallable slingInstallable,
                                       final Session inspectSession); @Override void afterScanPackage(final PackageId scanPackageId, final Session inspectSession); @Override void finishedScan(); }
ProgressCheckAliasFacade implements SilenceableCheck { @Override public void appliedRepoInitScripts(final PackageId scanPackageId, final List<String> scripts, final SlingInstallable slingInstallable, final Session inspectSession) throws RepositoryException { wrapped.appliedRepoInitScripts(scanPackageId, scripts, slingInstallable, inspectSession); } ProgressCheckAliasFacade(final @NotNull ProgressCheck wrapped,
                             final @Nullable String alias); @Override String getCheckName(); @Override @Nullable String getResourceBundleBaseName(); @Override void setResourceBundle(final ResourceBundle resourceBundle); @Override Collection<Violation> getReportedViolations(); @Override void startedScan(); @Override void setSilenced(final boolean silenced); @Override void simulateSling(final SlingSimulator slingSimulator, final Set<String> runModes); @Override void identifyPackage(final PackageId packageId, final File file); @Override void readManifest(final PackageId packageId, final Manifest manifest); @Override void beforeExtract(final PackageId packageId, final Session inspectSession,
                              final PackageProperties packageProperties, final MetaInf metaInf,
                              final List<PackageId> subpackages); @Override void importedPath(final PackageId packageId, final String path, final Node node,
                             final PathAction action); @Override void deletedPath(final PackageId packageId, final String path, final Session inspectSession); @Override void afterExtract(final PackageId packageId, final Session inspectSession); @Override void identifySubpackage(final PackageId packageId, final PackageId parentId); @Override void beforeSlingInstall(final PackageId scanPackageId,
                                   final SlingInstallable slingInstallable,
                                   final Session inspectSession); @Override void identifyEmbeddedPackage(final PackageId packageId,
                                        final PackageId parentId,
                                        final EmbeddedPackageInstallable slingInstallable); @Override void appliedRepoInitScripts(final PackageId scanPackageId,
                                       final List<String> scripts,
                                       final SlingInstallable slingInstallable,
                                       final Session inspectSession); @Override void afterScanPackage(final PackageId scanPackageId, final Session inspectSession); @Override void finishedScan();  }