### Question:
RunningService { public Collection<TaskContext> getRunningTasks(final String jobName) { Set<TaskContext> taskContexts = new CopyOnWriteArraySet<>(); Collection<TaskContext> result = RUNNING_TASKS.putIfAbsent(jobName, taskContexts); return null == result ? taskContexts : result; } 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 TaskContext.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();  }### Answer:
@Test public void assertAddWithoutData() { Assert.assertThat(runningService.getRunningTasks("test_job").size(), Is.is(1)); Assert.assertThat(runningService.getRunningTasks("test_job").iterator().next(), Is.is(taskContext)); Assert.assertThat(runningService.getRunningTasks("test_job_t").size(), Is.is(1)); Assert.assertThat(runningService.getRunningTasks("test_job_t").iterator().next(), Is.is(taskContextT)); }