### Question:
DefaultPlaceholderId implements PlaceholderId { @Override public DefaultPlaceholderId withTag(String k, String v) { return withTagFactory(new ConstantTagFactory(new BasicTag(k, v))); } DefaultPlaceholderId(String name, Registry registry); private  DefaultPlaceholderId(String name, Collection<TagFactory> tagFactories, Registry registry); @Override String name(); @Override DefaultPlaceholderId withTag(String k, String v); @Override DefaultPlaceholderId withTag(Tag t); @Override DefaultPlaceholderId withTags(Iterable<Tag> tags); @Override DefaultPlaceholderId withTags(Map<String, String> tags); @Override DefaultPlaceholderId withTagFactory(TagFactory factory); @Override DefaultPlaceholderId withTagFactories(Iterable<TagFactory> factories); @Override Id resolveToId(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void testWithTag() { Tag expected = new BasicTag("key", "value"); DefaultPlaceholderId id = new DefaultPlaceholderId("foo", REGISTRY).withTag(expected); Iterator<Tag> tags = id.resolveToId().tags().iterator(); Assertions.assertTrue(tags.hasNext(), "tags empty"); Assertions.assertEquals(expected, tags.next()); }