@Test
public void testToMetricData_stringMetricKey() {

    val actualMetric = mapperUnderTest.toMetricData(anomalyWithStringMetricKey);
    val actualMetricDef = actualMetric.getMetricDefinition();
    val actualTags = actualMetricDef.getTags();
    val actualKvTags = actualTags.getKv();
    val detectorUuid = anomalyWithStringMetricKey.getDetectorUuid().toString();
    val outlierResult = (OutlierDetectorResult) anomalyWithStringMetricKey.getAnomalyResult();
    val outlierLevel = outlierResult.getAnomalyLevel();
    assertEquals(detectorUuid, actualKvTags.get(AnomalyToMetricMapper.AA_DETECTOR_UUID));
    assertEquals(outlierLevel.toString(), actualKvTags.get(AnomalyToMetricMapper.AA_ANOMALY_LEVEL));
}