### Question:
TagsBuilder { public T withTag(String k, String v) { extraTags.add(new BasicTag(k, v)); return (T) this; } protected  TagsBuilder(); T withTag(String k, String v); T withTag(String k, Boolean v); T withTag(String k, Enum<E> v); T withTag(Tag t); T withTags(String... tags); T withTags(Tag... tags); T withTags(Iterable<Tag> tags); T withTags(Map<String, String> tags);  }### Answer:
@Test public void overwrite() { Id id = new Builder() .withTag("k", "v1") .withTag("k", "v2") .build(); Assertions.assertEquals(newId("k", "v1", "k", "v2"), id); }
@Test public void stringKeyValue() { Id id = new Builder() .withTag("k", "v") .build(); Assertions.assertEquals(newId("k", "v"), id); }
@Test public void booleanTrueValue() { Id id = new Builder() .withTag("k", true) .build(); Assertions.assertEquals(newId("k", "true"), id); }
@Test public void booleanFalseValue() { Id id = new Builder() .withTag("k", false) .build(); Assertions.assertEquals(newId("k", "false"), id); }
@Test public void enumValue() { Id id = new Builder() .withTag("k1", Level.info) .withTag("k2", Level.error) .build(); Assertions.assertEquals(newId("k1", "info", "k2", "error"), id); }
@Test public void tag() { Id id = new Builder() .withTag(new BasicTag("k", "v")) .build(); Assertions.assertEquals(newId("k", "v"), id); }