MesosSchedulerImpl implements Scheduler { @Override public void executorLost(SchedulerDriver schedulerDriver, ExecutorID executorID, SlaveID slaveID, int status) { log.warn("Lost executor " + executorID); counters.get("scheduler_lost_executors").incrementAndGet(); } @Inject  MesosSchedulerImpl(
      Storage storage,
      Lifecycle lifecycle,
      TaskStatusHandler taskStatusHandler,
      OfferManager offerManager,
      EventSink eventSink,
      @SchedulerExecutor Executor executor,
      CachedCounters counters); @VisibleForTesting  MesosSchedulerImpl(
      Storage storage,
      Lifecycle lifecycle,
      TaskStatusHandler taskStatusHandler,
      OfferManager offerManager,
      EventSink eventSink,
      Executor executor,
      CachedCounters counters,
      Logger log); @Override void slaveLost(SchedulerDriver schedulerDriver, SlaveID slaveId); @Override void registered(
      SchedulerDriver driver,
      final FrameworkID frameworkId,
      MasterInfo masterInfo); @Override void disconnected(SchedulerDriver schedulerDriver); @Override void reregistered(SchedulerDriver schedulerDriver, MasterInfo masterInfo); @Timed("scheduler_resource_offers") @Override void resourceOffers(SchedulerDriver driver, final List<Offer> offers); @Override void offerRescinded(SchedulerDriver schedulerDriver, OfferID offerId); @AllowUnchecked @Timed("scheduler_status_update") @Override void statusUpdate(SchedulerDriver driver, TaskStatus status); @Override void error(SchedulerDriver driver, String message); @Override void executorLost(SchedulerDriver schedulerDriver, ExecutorID executorID, SlaveID slaveID,
      int status); @Timed("scheduler_framework_message") @Override void frameworkMessage(
      SchedulerDriver driver,
      ExecutorID executorID,
      SlaveID slave,
      byte[] data);  }
@Test public void testExecutorLost() { control.replay(); scheduler.executorLost(driver, EXECUTOR_ID, SLAVE_ID, 1); }