package com.hubspot.singularity.managed;

import com.google.inject.Inject;
import com.hubspot.singularity.SingularityLeaderController;
import com.hubspot.singularity.SingularityManagedScheduledExecutorServiceFactory;
import com.hubspot.singularity.SingularityManagedThreadPoolFactory;
import com.hubspot.singularity.data.ExecutorIdGenerator;
import com.hubspot.singularity.mesos.SingularityMesosExecutorInfoSupport;
import com.hubspot.singularity.metrics.SingularityGraphiteReporter;
import com.hubspot.singularity.scheduler.SingularityLeaderOnlyPoller;
import com.ning.http.client.AsyncHttpClient;
import java.util.Set;
import org.apache.curator.framework.CuratorFramework;
import org.apache.curator.framework.recipes.leader.LeaderLatch;

public class SingularityLifecycleManagedTest extends SingularityLifecycleManaged {

  @Inject
  public SingularityLifecycleManagedTest(
    SingularityManagedThreadPoolFactory cachedThreadPoolFactory,
    SingularityManagedScheduledExecutorServiceFactory scheduledExecutorServiceFactory,
    AsyncHttpClient asyncHttpClient,
    CuratorFramework curatorFramework,
    SingularityLeaderController leaderController,
    LeaderLatch leaderLatch,
    SingularityMesosExecutorInfoSupport executorInfoSupport,
    SingularityGraphiteReporter graphiteReporter,
    ExecutorIdGenerator executorIdGenerator,
    Set<SingularityLeaderOnlyPoller> leaderOnlyPollers
  ) {
    super(
      cachedThreadPoolFactory,
      scheduledExecutorServiceFactory,
      asyncHttpClient,
      curatorFramework,
      leaderController,
      leaderLatch,
      executorInfoSupport,
      graphiteReporter,
      executorIdGenerator,
      leaderOnlyPollers
    );
  }

  @Override
  protected boolean startLeaderPollers() {
    return false;
  }
}

@@ -270,32 +270,96 @@
 eadPoolFactory;%0A
+import com.hubspot.singularity.config.SingularityConfiguration;%0A
 import com.hubsp
@@ -1450,16 +1450,60 @@
 yPollers
+,%0A    SingularityConfiguration configuration
 %0A  ) %7B%0A 
@@ -1773,16 +1773,37 @@
 yPollers
+,%0A      configuration
 %0A    );%0A

fix test