### Question:
DefaultPlaceholderId implements PlaceholderId { @Override public Id resolveToId() { Iterable<Tag> tags = tagFactories.stream() .map(TagFactory::createTag) .filter(Objects::nonNull) .collect(Collectors.toList()); return registry.createId(name, tags); } 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 testResolveToId() { Tag tag = new BasicTag("key", "value"); Id expected = REGISTRY.createId("foo").withTag(tag); PlaceholderId placeholderId = new DefaultPlaceholderId("foo", REGISTRY).withTag(tag); Assertions.assertEquals(expected, placeholderId.resolveToId()); }