public static Sensor droppedRecordsSensor(final String threadId,
                                              final String taskId,
                                              final StreamsMetricsImpl streamsMetrics) {
        return invocationRateAndTotalSensor(
            threadId,
            taskId,
            DROPPED_RECORDS,
            DROPPED_RECORDS_RATE_DESCRIPTION,
            DROPPED_RECORDS_TOTAL_DESCRIPTION,
            RecordingLevel.INFO,
            streamsMetrics
        );
    }
@Test
    public void shouldGetDroppedRecordsSensor() {
        final String operation = "dropped-records";
        final String totalDescription = "The total number of dropped records";
        final String rateDescription = "The average number of dropped records per second";
        when(streamsMetrics.taskLevelSensor(THREAD_ID, TASK_ID, operation, RecordingLevel.INFO)).thenReturn(expectedSensor);
        when(streamsMetrics.taskLevelTagMap(THREAD_ID, TASK_ID)).thenReturn(tagMap);

        try (final MockedStatic<StreamsMetricsImpl> streamsMetricsStaticMock = mockStatic(StreamsMetricsImpl.class)) {
            final Sensor sensor = TaskMetrics.droppedRecordsSensor(THREAD_ID, TASK_ID, streamsMetrics);
            streamsMetricsStaticMock.verify(
                () -> StreamsMetricsImpl.addInvocationRateToSensor(
                    expectedSensor,
                    TASK_LEVEL_GROUP,
                    tagMap,
                    operation,
                    rateDescription
                )
            );
            streamsMetricsStaticMock.verify(
                () -> StreamsMetricsImpl.addSumMetricToSensor(
                    expectedSensor,
                    TASK_LEVEL_GROUP,
                    tagMap,
                    operation,
                    true,
                    totalDescription
                )
            );
            assertThat(sensor, is(expectedSensor));
        }
    }