public static Sensor hitRatioSensor(final StreamsMetricsImpl streamsMetrics,
                                        final String threadId,
                                        final String taskName,
                                        final String storeName) {

        final Sensor hitRatioSensor;
        final String hitRatioName;
        hitRatioName = HIT_RATIO;
        hitRatioSensor = streamsMetrics.cacheLevelSensor(
            threadId,
            taskName,
            storeName,
            hitRatioName,
            Sensor.RecordingLevel.DEBUG
        );
        addAvgAndMinAndMaxToSensor(
            hitRatioSensor,
            CACHE_LEVEL_GROUP,
            streamsMetrics.cacheLevelTagMap(threadId, taskName, storeName),
            hitRatioName,
            HIT_RATIO_AVG_DESCRIPTION,
            HIT_RATIO_MIN_DESCRIPTION,
            HIT_RATIO_MAX_DESCRIPTION
        );
        return hitRatioSensor;
    }
@Test
    public void shouldGetHitRatioSensorWithBuiltInMetricsVersionCurrent() {
        final String hitRatio = "hit-ratio";
        when(streamsMetrics.cacheLevelSensor(THREAD_ID, TASK_ID, STORE_NAME, hitRatio, RecordingLevel.DEBUG)).thenReturn(expectedSensor);
        when(streamsMetrics.cacheLevelTagMap(THREAD_ID, TASK_ID, STORE_NAME)).thenReturn(tagMap);

        try (final MockedStatic<StreamsMetricsImpl> streamsMetricsStaticMock = mockStatic(StreamsMetricsImpl.class)) {
            final Sensor sensor = NamedCacheMetrics.hitRatioSensor(streamsMetrics, THREAD_ID, TASK_ID, STORE_NAME);
            streamsMetricsStaticMock.verify(
                () -> StreamsMetricsImpl.addAvgAndMinAndMaxToSensor(
                    expectedSensor,
                    StreamsMetricsImpl.CACHE_LEVEL_GROUP,
                    tagMap,
                    hitRatio,
                    HIT_RATIO_AVG_DESCRIPTION,
                    HIT_RATIO_MIN_DESCRIPTION,
                    HIT_RATIO_MAX_DESCRIPTION
                )
            );
            assertThat(sensor, is(expectedSensor));
        }
    }