### Question:
TaskMetricGroup extends ComponentMetricGroup<TaskManagerJobMetricGroup> { @Override protected QueryScopeInfo.TaskQueryScopeInfo createQueryServiceMetricInfo(CharacterFilter filter) { return new QueryScopeInfo.TaskQueryScopeInfo( this.parent.jobId.toString(), String.valueOf(this.vertexId), this.subtaskIndex); } TaskMetricGroup(
			MetricRegistry registry,
			TaskManagerJobMetricGroup parent,
			@Nullable JobVertexID vertexId,
			AbstractID executionId,
			@Nullable String taskName,
			int subtaskIndex,
			int attemptNumber); final TaskManagerJobMetricGroup parent(); AbstractID executionId(); @Nullable AbstractID vertexId(); @Nullable String taskName(); int subtaskIndex(); int attemptNumber(); TaskIOMetricGroup getIOMetricGroup(); OperatorMetricGroup getOrAddOperator(String name); OperatorMetricGroup getOrAddOperator(OperatorID operatorID, String name); @Override void close();  }### Answer:
@Test public void testCreateQueryServiceMetricInfo() { JobID jid = new JobID(); JobVertexID vid = new JobVertexID(); AbstractID eid = new AbstractID(); TaskManagerMetricGroup tm = new TaskManagerMetricGroup(registry, "host", "id"); TaskManagerJobMetricGroup job = new TaskManagerJobMetricGroup(registry, tm, jid, "jobname"); TaskMetricGroup task = new TaskMetricGroup(registry, job, vid, eid, "taskName", 4, 5); QueryScopeInfo.TaskQueryScopeInfo info = task.createQueryServiceMetricInfo(new DummyCharacterFilter()); assertEquals("", info.scope); assertEquals(jid.toString(), info.jobID); assertEquals(vid.toString(), info.vertexID); assertEquals(4, info.subtaskIndex); }