@Test public void join_idempotent() {

  TraceContext incoming = TraceContext.newBuilder().traceId(1L).spanId(2L).sampled(true)
    .shared(true).build();
  TraceContext joined = tracer.joinSpan(incoming).context();
  assertThat(joined).isNotSameAs(incoming);
  assertThat(tracer.joinSpan(incoming).context()).isSameAs(joined);
}