@Test protected void getTraces_endTsAndLookback(TestInfo testInfo) throws Exception {
    String testSuffix = testSuffix(testInfo);
    Span span1 = spanBuilder(testSuffix).timestamp((TODAY + 1) * 1000L).build();
    Span span2 = span1.toBuilder().traceId(newTraceId()).timestamp((TODAY + 2) * 1000L).build();
    accept(span1, span2);

    assertGetTracesReturnsEmpty(
      requestBuilder().endTs(TODAY).build());

    assertGetTracesReturns(
      requestBuilder().endTs(TODAY + 1).build(),
      List.of(span1));

    assertGetTracesReturns(
      requestBuilder().endTs(TODAY + 2).build(),
      List.of(span1), List.of(span2));

    assertGetTracesReturns(
      requestBuilder().endTs(TODAY + 3).build(),
      List.of(span1), List.of(span2));

    assertGetTracesReturnsEmpty(
      requestBuilder().endTs(TODAY).build());

    assertGetTracesReturns(
      requestBuilder().endTs(TODAY + 1).lookback(1).build(),
      List.of(span1));

    assertGetTracesReturns(
      requestBuilder().endTs(TODAY + 2).lookback(1).build(),
      List.of(span1), List.of(span2));

    assertGetTracesReturns(
      requestBuilder().endTs(TODAY + 3).lookback(1).build(),
      List.of(span2));
  }
Traces whose root span has timestamps between (endTs - lookback) and endTs are returned
zipkin-tests/src/main/java/zipkin2/storage/ITSpanStore.java