### Question:
Tag { public static Tag<String> create(String key, String value) { return new StringTag(key, value); } private  Tag(String key, T value); static Tag<String> create(String key, String value); static Tag<Number> create(String key, Number value); static Tag<Boolean> create(String key, boolean value); String key(); T value(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); abstract void apply(Span span);  }### Answer:
@Test void testStringTag() { String key = "theKey"; String value = "someValue"; Tag<String> theTag = Tag.create(key, value); testValue(theTag, key, value); testEqualAndHashCode(theTag, Tag.create(key, value), Tag.create(key, "otherValue"), Tag.create("otherKey", value)); testToString(theTag); testApply(theTag); }
@Test void testBooleanTag() { String key = "theKey"; boolean value = true; Tag<Boolean> theTag = Tag.create(key, value); testValue(theTag, key, value); testEqualAndHashCode(theTag, Tag.create(key, value), Tag.create(key, false), Tag.create("otherKey", value)); testToString(theTag); testApply(theTag); }
@Test void testIntTag() { String key = "theKey"; Integer value = 42; Tag<Number> theTag = Tag.create(key, value); testValue(theTag, key, value); testEqualAndHashCode(theTag, Tag.create(key, value), Tag.create(key, 47), Tag.create("otherKey", value)); testToString(theTag); testApply(theTag); }
@Test void testBigIntTag() { String key = "theKey"; BigInteger value = new BigInteger("74447851266545852235469"); Tag<Number> theTag = Tag.create(key, value); testValue(theTag, key, value); testEqualAndHashCode(theTag, Tag.create(key, value), Tag.create(key, new BigInteger("147")), Tag.create("otherKey", value)); testToString(theTag); testApply(theTag); }