### Question:
ReconcileService extends AbstractScheduledService { public void explicitReconcile() { lock.lock(); try { Set<TaskContext> runningTask = new HashSet<>(); for (Set<TaskContext> each : facadeService.getAllRunningTasks().values()) { runningTask.addAll(each); } if (runningTask.isEmpty()) { return; } log.info("Requesting {} tasks reconciliation with the Mesos master", runningTask.size()); schedulerDriver.reconcileTasks(Collections2.transform(runningTask, new Function<TaskContext, Protos.TaskStatus>() { @Override public Protos.TaskStatus apply(final TaskContext input) { return Protos.TaskStatus.newBuilder() .setTaskId(Protos.TaskID.newBuilder().setValue(input.getId()).build()) .setSlaveId(Protos.SlaveID.newBuilder().setValue(input.getSlaveId()).build()) .setState(Protos.TaskState.TASK_RUNNING).build(); } })); } finally { lock.unlock(); } }  void explicitReconcile(); void implicitReconcile();  }### Answer:
@Test public void assertExplicitReconcile() { Map<String, Set<TaskContext>> runningTaskMap = new HashMap<>(); runningTaskMap.put("transient_test_job", Sets.newHashSet( TaskContext.from("transient_test_job@-@0@-@READY@-@SLAVE-S0@-@UUID"), TaskContext.from("transient_test_job@-@1@-@READY@-@SLAVE-S0@-@UUID"))); when(facadeService.getAllRunningTasks()).thenReturn(runningTaskMap); reconcileService.explicitReconcile(); verify(schedulerDriver).reconcileTasks(taskStatusCaptor.capture()); assertThat(taskStatusCaptor.getValue().size(), is(2)); for (Protos.TaskStatus each : taskStatusCaptor.getValue()) { assertThat(each.getSlaveId().getValue(), is("SLAVE-S0")); assertThat(each.getState(), is(Protos.TaskState.TASK_RUNNING)); } }