### Question:
RealSpan extends Span { @Override public Span tag(String key, String value) { synchronized (state) { state.tag(key, value); } return this; } RealSpan(TraceContext context,
    PendingSpans pendingSpans,
    MutableSpan state,
    Clock clock
  ); @Override boolean isNoop(); @Override TraceContext context(); @Override SpanCustomizer customizer(); @Override Span start(); @Override Span start(long timestamp); @Override Span name(String name); @Override Span kind(Kind kind); @Override Span annotate(String value); @Override Span annotate(long timestamp, String value); @Override Span tag(String key, String value); @Override Span error(Throwable throwable); @Override Span remoteServiceName(String remoteServiceName); @Override boolean remoteIpAndPort(String remoteIp, int remotePort); @Override void finish(); @Override void finish(long timestamp); @Override void abandon(); @Override void flush(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test public void tag() { span.tag("foo", "bar"); span.flush(); assertThat(spans).flatExtracting(s -> s.tags().entrySet()) .containsExactly(entry("foo", "bar")); }