@Test void constructsTraceTree() {
    List<Span> trace = List.of(
      Span.newBuilder().traceId("a").id("a").build(),
      Span.newBuilder().traceId("a").parentId("a").id("b").build(),
      Span.newBuilder().traceId("a").parentId("b").id("c").build(),
      Span.newBuilder().traceId("a").parentId("c").id("d").build()
    );
    assertAncestry(trace);
  }
Makes sure that the trace tree is constructed based on parent-child, not by parameter order.
zipkin/src/test/java/zipkin2/internal/SpanNodeTest.java