private static final ObjectNameMapper DEFAULT_MAPPER = new DefaultObjectNameMapper();
private static final String TEST_DOMAIN = "testDomain";
@Test
public void testStandardMapping() {
MonitorConfig config = MonitorConfig.builder("testName").withTag("foo", "bar").build();
ObjectName name = DEFAULT_MAPPER.createObjectName(TEST_DOMAIN, new BasicCounter(config));
assertEquals(name.getDomain(), TEST_DOMAIN);
assertEquals(name.getKeyPropertyListString(),
String.format("name=testName,%s=COUNTER,foo=bar",
DataSourceType.KEY));