public final Sensor taskLevelSensor(final String threadId,
                                        final String taskId,
                                        final String sensorSuffix,
                                        final RecordingLevel recordingLevel,
                                        final Sensor... parents) {
        final String sensorPrefix = taskSensorPrefix(threadId, taskId);
        synchronized (taskLevelSensors) {
            return getSensors(taskLevelSensors, sensorSuffix, sensorPrefix, recordingLevel, parents);
        }
    }
@Test
    public void shouldGetNewTaskLevelSensor() {
        final Metrics metrics = mock(Metrics.class);
        final RecordingLevel recordingLevel = RecordingLevel.INFO;
        setupGetNewSensorTest(metrics, recordingLevel);
        final StreamsMetricsImpl streamsMetrics = new StreamsMetricsImpl(metrics, CLIENT_ID, VERSION, time);

        final Sensor actualSensor = streamsMetrics.taskLevelSensor(
            THREAD_ID1,
            TASK_ID1,
            SENSOR_NAME_1,
            recordingLevel
        );

        assertThat(actualSensor, is(equalToObject(sensor)));
    }