### Question:
MdcTagFactory implements TagFactory { @Override public String name() { return name; } MdcTagFactory(String name); @Override String name(); @Override Tag createTag();  }### Answer:
@Test public void testNameFromKey() throws Exception { String expected = "factoryName"; TagFactory factory = new MdcTagFactory(expected); Assertions.assertEquals(expected, factory.name()); }