### Question:
RunningService { public boolean isTaskRunning(final TaskContext.MetaInfo metaInfo) { for (TaskContext each : getRunningTasks(metaInfo.getJobName())) { if (each.getMetaInfo().equals(metaInfo)) { return true; } } return false; } 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 assertIsTaskRunning() { Assert.assertTrue(runningService.isTaskRunning(TaskContext.MetaInfo.from(TaskNode.builder().build().getTaskNodePath()))); }
@Test public void assertIsTaskNotRunning() { Assert.assertFalse(runningService.isTaskRunning(TaskContext.MetaInfo.from(TaskNode.builder().shardingItem(2).build().getTaskNodePath()))); }