### Question:
DefaultPlaceholderId implements PlaceholderId { @Override public String toString() { return resolveToId().toString(); } 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 testToString() { DefaultPlaceholderId id = (new DefaultPlaceholderId("foo", REGISTRY)).withTag("k1", "v1").withTag("k2", "v2"); Assertions.assertEquals("foo:k1=v1:k2=v2", id.toString()); }
@Test public void testToStringNameOnly() { DefaultPlaceholderId id = new DefaultPlaceholderId("foo", REGISTRY); Assertions.assertEquals(id.toString(), "foo"); }