@Test
public void testWithMetadata() {

    String constructorMetricName = "org.eclipse.microprofile.metrics.tck.cdi.stereotype.bloop.StereotypeCountedClassBeanWithSpecifiedMetadata";
    MetricID constructorMetricId = new MetricID(constructorMetricName);
    assertNotNull(metricRegistry.getCounter(constructorMetricId));
    Metadata constructorMetadata = metricRegistry.getMetadata(constructorMetricName);
    assertEquals("description", constructorMetadata.description().orElse(null));
    assertEquals("displayName", constructorMetadata.getDisplayName());
    String methodMetricName = "org.eclipse.microprofile.metrics.tck.cdi.stereotype.bloop.foo";
    MetricID methodMetricId = new MetricID(methodMetricName);
    assertNotNull(metricRegistry.getCounter(methodMetricId));
    Metadata methodMetadata = metricRegistry.getMetadata(methodMetricName);
    assertEquals("description", methodMetadata.description().orElse(null));
    assertEquals("displayName", methodMetadata.getDisplayName());
    beanWithSpecifiedMetadata.foo();
    assertEquals(1, metricRegistry.getCounter(methodMetricId).getCount());
}