@Test protected void duplicateAddress(TestInfo testInfo) throws Exception {
    String testSuffix = testSuffix(testInfo);
    String traceId = newTraceId();

    Endpoint frontend = suffixServiceName(TestObjects.FRONTEND, testSuffix);
    Endpoint backend = suffixServiceName(TestObjects.BACKEND, testSuffix);

    V1SpanConverter converter = V1SpanConverter.create();
    List<Span> trace = new ArrayList<>();
    converter.convert(V1Span.newBuilder().traceId(traceId).id("20").name("get")
      .timestamp(TODAY * 1000L).duration(350L * 1000L)
      .addAnnotation(TODAY * 1000, "sr", frontend)
      .addAnnotation((TODAY + 350) * 1000, "ss", frontend)
      .addBinaryAnnotation("ca", frontend)
      .addBinaryAnnotation("sa", frontend).build(), trace);
    converter.convert(V1Span.newBuilder().traceId(traceId).parentId("21").id("22").name("get")
      .timestamp((TODAY + 50) * 1000L).duration(250L * 1000L)
      .addAnnotation((TODAY + 50) * 1000, "cs", frontend)
      .addAnnotation((TODAY + 300) * 1000, "cr", frontend)
      .addBinaryAnnotation("ca", backend)
      .addBinaryAnnotation("sa", backend).build(), trace);

    processDependencies(trace);

    assertThat(store().getDependencies(TODAY + 1000, 1000L).execute()).containsOnly(
      DependencyLink.newBuilder()
        .parent(frontend.serviceName())
        .child(backend.serviceName())
        .callCount(1)
        .build()
    );
  }
This test confirms that the span store can process trace with intermediate spans like the below
properly.
<p>
span1: SR SS span2: intermediate call span3: CS SR SS CR: Dependency 1
zipkin-tests/src/main/java/zipkin2/storage/ITDependencies.java