@Test protected void dependencies_loopback(TestInfo testInfo) throws Exception {
    String testSuffix = testSuffix(testInfo);
    List<Span> trace = newTrace(testSuffix);

    List<Span> traceWithLoopback = List.of(
      trace.get(0),
      trace.get(1).toBuilder().remoteEndpoint(trace.get(0).localEndpoint()).build()
    );

    processDependencies(traceWithLoopback);

    String frontend = appendSuffix(TestObjects.FRONTEND.serviceName(), testSuffix);

    assertThat(store().getDependencies(endTs(trace), DAY).execute()).containsOnly(
      DependencyLink.newBuilder().parent(frontend).child(frontend).callCount(1).build()
    );
  }
When all servers are instrumented, they all record {@link Kind#SERVER} and the {@link
Span#localEndpoint()} indicates the service.
zipkin-tests/src/main/java/zipkin2/storage/ITDependencies.java