@Test void mergesWhenMissingEndpoints() {
    List<Span> trace = List.of(
      Span.newBuilder()
        .traceId("a")
        .id("a")
        .putTag("service", "frontend")
        .putTag("span.kind", "SERVER")
        .build(),
      Span.newBuilder()
        .traceId("a")
        .parentId("a")
        .id("b")
        .putTag("service", "frontend")
        .putTag("span.kind", "CLIENT")
        .timestamp(1L)
        .build(),
      span("a", "a", "b", Kind.SERVER, "backend", null, true),
      Span.newBuilder().traceId("a").parentId("a").id("b").duration(10L).build()
    );

    assertThat(Trace.merge(trace)).usingFieldByFieldElementComparator().containsExactlyInAnyOrder(
      Span.newBuilder()
        .traceId("a")
        .id("a")
        .putTag("service", "frontend")
        .putTag("span.kind", "SERVER")
        .build(),
      Span.newBuilder()
        .traceId("a")
        .parentId("a")
        .id("b")
        .putTag("service", "frontend")
        .putTag("span.kind", "CLIENT")
        .timestamp(1L)
        .duration(10L)
        .build(),
      span("a", "a", "b", Kind.SERVER, "backend", null, true)
    );
  }
Let's pretend people use crappy data, but only on the first hop.
zipkin/src/test/java/zipkin2/internal/TraceTest.java