public SpanInScope withSpanInScope(@Nullable Span span) {
    return new SpanInScope(currentTraceContext.newScope(span != null ? span.context() : null));
  }
@Test void withSpanInScope() {
    Span current = tracer.newTrace();

    try (SpanInScope scope = tracer.withSpanInScope(current)) {
      assertThat(tracer.currentSpan())
        .isEqualTo(current);
      assertThat(tracer.currentSpanCustomizer())
        .isNotEqualTo(current)
        .isNotEqualTo(NoopSpanCustomizer.INSTANCE);
    }

    // context was cleared
    assertThat(tracer.currentSpan()).isNull();
  }