@Test protected void getTrace_differentiatesDebugFromShared(TestInfo testInfo) throws Exception {
    String testSuffix = testSuffix(testInfo);
    Span clientSpan = newClientSpan(testSuffix).toBuilder()
      .debug(true)
      .build();
    Span serverSpan = clientSpan.toBuilder().kind(SERVER)
      .debug(null).shared(true)
      .build();

    accept(clientSpan, serverSpan);

    // assertGetTraceReturns does recursive comparison
    assertGetTraceReturns(clientSpan.traceId(), List.of(clientSpan, serverSpan));
  }
Prevents subtle bugs which can result in mixed-length traces from linking.
zipkin-tests/src/main/java/zipkin2/storage/ITTraces.java