OrchestratorImpl implements Orchestrator { @Override public Set<ApplicationId> getAllSuspendedApplications() { Set<ApplicationInstanceReference> refSet = statusService.getAllSuspendedApplications(); return refSet.stream().map(OrchestratorUtil::toApplicationId).collect(Collectors.toSet()); } @Inject  OrchestratorImpl(ClusterControllerClientFactory clusterControllerClientFactory,
                            StatusService statusService,
                            OrchestratorConfig orchestratorConfig,
                            ServiceMonitor serviceMonitor,
                            ConfigserverConfig configServerConfig,
                            FlagSource flagSource);  OrchestratorImpl(Policy policy,
                            ClusterControllerClientFactory clusterControllerClientFactory,
                            StatusService statusService,
                            ServiceMonitor serviceMonitor,
                            int serviceMonitorConvergenceLatencySeconds,
                            Clock clock,
                            ApplicationApiFactory applicationApiFactory,
                            FlagSource flagSource); @Override Host getHost(HostName hostName); @Override HostStatus getNodeStatus(HostName hostName); @Override HostInfo getHostInfo(ApplicationInstanceReference reference, HostName hostname); @Override Function<HostName, Optional<HostInfo>> getHostResolver(); @Override void setNodeStatus(HostName hostName, HostStatus status); @Override void resume(HostName hostName); @Override void suspend(HostName hostName); @Override void acquirePermissionToRemove(HostName hostName); @Override ApplicationInstanceStatus getApplicationInstanceStatus(ApplicationId appId); @Override Set<ApplicationId> getAllSuspendedApplications(); @Override void resume(ApplicationId appId); @Override void suspend(ApplicationId appId); @Override void suspendAll(HostName parentHostname, List<HostName> hostNames);  }
@Test public void appliations_list_returns_empty_initially() { assertThat(orchestrator.getAllSuspendedApplications(), is(empty())); }