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

    // Let's pretend we have two days of data processed
    //  - Note: calling this twice allows test implementations to consider timestamps
    processDependencies(subtractDay(trace));
    processDependencies(trace);

    // A user looks at today's links.
    //  - Note: Using the smallest lookback avoids bumping into implementation around windowing.
    long lookback = trace.get(0).durationAsLong() / 1000L;
    assertThat(store().getDependencies(endTs(trace), lookback).execute())
      .containsExactlyInAnyOrderElementsOf(links(testSuffix));

    // A user compares the links from those a day ago.
    assertThat(store().getDependencies(endTs(trace) - DAY, DAY).execute())
      .containsExactlyInAnyOrderElementsOf(links(testSuffix));

    // A user looks at all links since data started
    String frontend = appendSuffix(TestObjects.FRONTEND.serviceName(), testSuffix);
    String backend = appendSuffix(TestObjects.BACKEND.serviceName(), testSuffix);
    String db = appendSuffix(TestObjects.DB.serviceName(), testSuffix);

    assertThat(store().getDependencies(endTs(trace), DAY * 2).execute()).containsOnly(
      DependencyLink.newBuilder().parent(frontend).child(backend).callCount(2L).build(),
      DependencyLink.newBuilder().parent(backend).child(db).callCount(2L).errorCount(2L).build()
    );
  }
This test shows that dependency links can be filtered at daily granularity. This allows the UI
to look for dependency intervals besides TODAY.
zipkin-tests/src/main/java/zipkin2/storage/ITDependencies.java