Source:
public void run(BenchFlowTestManagerConfiguration configuration, Environment environment) throws Exception { logger.info("run"); minioServiceAddress = configuration.getMinioServiceFactory().getAddress(); experimentManagerAddress = "http://" + configuration.getBenchFlowExperimentManagerServiceFactory().getAddress(); MongoClient mongoClient = configuration.getMongoDBFactory().build(); ExecutorService taskExecutor = configuration.getTaskExecutorFactory().build(environment); ScheduledThreadPoolExecutor timeOutScheduledThreadPoolExecutor = new ScheduledThreadPoolExecutor(1); testModelDAO = new BenchFlowTestModelDAO(mongoClient); explorationModelDAO = new ExplorationModelDAO(mongoClient, testModelDAO); experimentModelDAO = new BenchFlowExperimentModelDAO(mongoClient, testModelDAO); userDAO = new UserDAO(mongoClient, testModelDAO); minioService = configuration.getMinioServiceFactory().build(); experimentManagerService = configuration.getBenchFlowExperimentManagerServiceFactory() .build(configuration, environment); testTaskScheduler = new TestTaskScheduler(taskExecutor, timeOutScheduledThreadPoolExecutor); testTaskScheduler.initialize(); minioService.initializeBuckets(); final BenchFlowTestResource testResource = new BenchFlowTestResource(); final BenchFlowExperimentResource experimentResource = new BenchFlowExperimentResource(); final BenchFlowTrialResource trialResource = new BenchFlowTrialResource(); environment.jersey().register(testResource); environment.jersey().register(experimentResource); environment.jersey().register(trialResource); environment.jersey().register(MultiPartFeature.class); }

Target:
public void run(BenchFlowTestManagerConfiguration configuration, Environment environment) throws Exception { logger.info("run"); minioServiceAddress = configuration.getMinioServiceFactory().getAddress(); experimentManagerAddress = "http://" + configuration.getBenchFlowExperimentManagerServiceFactory().getAddress(); MongoClient mongoClient = configuration.getMongoDBFactory().build(); CustomFutureReturningExecutor taskExecutor = configuration.getTaskExecutorFactory().build(environment); ScheduledThreadPoolExecutor timeOutScheduledThreadPoolExecutor = new ScheduledThreadPoolExecutor(1); testTaskScheduler = new TestTaskScheduler(taskExecutor, timeOutScheduledThreadPoolExecutor); testModelDAO = new BenchFlowTestModelDAO(mongoClient); explorationModelDAO = new ExplorationModelDAO(mongoClient, testModelDAO); experimentModelDAO = new BenchFlowExperimentModelDAO(mongoClient, testModelDAO); userDAO = new UserDAO(mongoClient, testModelDAO); minioService = configuration.getMinioServiceFactory().build(); experimentManagerService = configuration.getBenchFlowExperimentManagerServiceFactory() .build(configuration, environment); testTaskScheduler.initialize(); minioService.initializeBuckets(); final BenchFlowTestResource testResource = new BenchFlowTestResource(); final BenchFlowExperimentResource experimentResource = new BenchFlowExperimentResource(); final BenchFlowTrialResource trialResource = new BenchFlowTrialResource(); environment.jersey().register(testResource); environment.jersey().register(experimentResource); environment.jersey().register(trialResource); environment.jersey().register(MultiPartFeature.class); }