public static MetricNamingStrategy<MetricName> getClientTelemetryMetricNamingStrategy(String prefix) {
        Objects.requireNonNull(prefix, "prefix cannot be null");

        return new MetricNamingStrategy<MetricName>() {
            @Override
            public MetricKey metricKey(MetricName metricName) {
                Objects.requireNonNull(metricName, "metric name cannot be null");

                return new MetricKey(fullMetricName(prefix, metricName.group(), metricName.name()),
                    Collections.unmodifiableMap(cleanTags(metricName.tags())));
            }

            @Override
            public MetricKey derivedMetricKey(MetricKey key, String derivedComponent) {
                Objects.requireNonNull(derivedComponent, "derived component cannot be null");
                return new MetricKey(key.name() + NAME_JOINER + derivedComponent, key.tags());
            }
        };
    }
@Test
    public void testNullPrefix() {
        Exception e = assertThrows(NullPointerException.class, () -> TelemetryMetricNamingConvention
            .getClientTelemetryMetricNamingStrategy(null));
        assertEquals("prefix cannot be null", e.getMessage());
    }