ElasticsearchScheduler implements Scheduler { public void run(SchedulerDriver schedulerDriver) { LOGGER.info("Starting ElasticSearch on Mesos - [numHwNodes: " + configuration.getElasticsearchNodes() + ", zk mesos: " + configuration.getMesosZKURL() + ", ram:" + configuration.getMem() + "]"); LOGGER.debug("Starting task reaper"); taskReaper = new TaskReaper(schedulerDriver, configuration, clusterState); schedulerDriver.run(); } ElasticsearchScheduler(Configuration configuration, FrameworkState frameworkState, ClusterState clusterState, TaskInfoFactory taskInfoFactory, OfferStrategy offerStrategy, SerializableState zookeeperStateDriver); Map<String, Task> getTasks(); void run(SchedulerDriver schedulerDriver); void reapTasks(); @Override void registered(SchedulerDriver driver, Protos.FrameworkID frameworkId, Protos.MasterInfo masterInfo); @Override void reregistered(SchedulerDriver driver, Protos.MasterInfo masterInfo); @Override void resourceOffers(SchedulerDriver driver, List<Protos.Offer> offers); @Override void offerRescinded(SchedulerDriver driver, Protos.OfferID offerId); @Override void statusUpdate(SchedulerDriver driver, Protos.TaskStatus status); @Override void frameworkMessage(SchedulerDriver driver, Protos.ExecutorID executorId, Protos.SlaveID slaveId, byte[] data); @Override void disconnected(SchedulerDriver driver); @Override void slaveLost(SchedulerDriver driver, Protos.SlaveID slaveId); @Override void executorLost(SchedulerDriver driver, Protos.ExecutorID executorId, Protos.SlaveID slaveId, int status); @Override void error(SchedulerDriver driver, String message); void shutdown(SchedulerDriver driver);  }
@Test public void willRunDriver() throws Exception { scheduler.run(driver); verify(driver).run(); }