  @Test
  public void
      test_that_calculateLifetime_uses_supplied_lifetime_if_start_and_end_time_not_provided() {

    long lifetimeInMinutes = 5L;
    Instant now = Instant.now();
    Instant later = null;
    CanaryAnalysisExecutionRequest request =
        CanaryAnalysisExecutionRequest.builder().lifetimeDurationMins(5L).build();

    Duration actual = stage.calculateLifetime(now, later, request);
    Duration expected = Duration.ofMinutes(lifetimeInMinutes);

    assertEquals("The duration should be 5 minutes", expected, actual);
  }