@Test
    public void testMetricKeyWithMixedNameAndMixedTags() {
        Map<String, String> tags = new HashMap<>();
        tags.put("tag1-Ab-2_(", "value1");
        tags.put("tag2-HELLO.@", "value2");

        MetricName metricName = new MetricName("test-Name-1.$", "grouP-name-AB_&", "description", tags);
        MetricKey metricKey = metricNamingStrategy.metricKey(metricName);

        tags.clear();
        tags.put("tag1_ab_2_(", "value1");
        tags.put("tag2_hello.@", "value2");

        assertEquals("org.apache.kafka.group.name.ab_&.test.name.1.$", metricKey.name());
        assertEquals(tags, metricKey.tags());
    }
Test metric key with mixed name and mixed tags where mixed represents combination of upper case,
lower case, numbers, hyphen, dot, underscore and special characters.
clients/src/test/java/org/apache/kafka/common/telemetry/internals/TelemetryMetricNamingConventionTest.java