RunningService { public boolean isJobRunning(final String jobName) { return !getRunningTasks(jobName).isEmpty(); } RunningService(final CoordinatorRegistryCenter regCenter); void start(); void add(final TaskContext taskContext); void updateIdle(final TaskContext taskContext, final boolean isIdle); void remove(final String jobName); void remove(final TaskContext taskContext); boolean isJobRunning(final String jobName); boolean isTaskRunning(final MetaInfo metaInfo); Collection<TaskContext> getRunningTasks(final String jobName); Map<String, Set<TaskContext>> getAllRunningTasks(); Set<TaskContext> getAllRunningDaemonTasks(); void addMapping(final String taskId, final String hostname); String popMapping(final String taskId); void clear();  }
@Test public void assertIsJobRunning() { assertTrue(runningService.isJobRunning("test_job")); }