@Test void linksLoopbackSpans() {
    List<Span> validRootSpans = List.of(
      span("a", null, "a", Kind.SERVER, "service", "service", false),
      span("b", null, "b", Kind.CLIENT, "service", "service", false)
    );

    for (Span span : validRootSpans) {
      assertThat(new DependencyLinker().putTrace(List.of(span)).link()).containsOnly(
        DependencyLink.newBuilder().parent("service").child("service").callCount(1L).build()
      );
    }
  }
A loopback span is direction-agnostic, so can be linked properly regardless of kind.
zipkin/src/test/java/zipkin2/internal/DependencyLinkerTest.java