@Override
  public Optional<Long> getTimeUntilBackupRequestNano()
  {
    _costLimiter.arrive();

    synchronized (_lock)
    {
      if (_histogramReady)
      {
        return Optional.of(Math.max(_minBackupDelayNano, _histogram.getValueAtPercentile(_percentile)));
      } else
      {
        return Optional.empty();
      }
    }
  }
@Test
  public void testValuesOutOfRange()
  {
    BoundedCostBackupRequestsStrategy strategy = new BoundedCostBackupRequestsStrategy(5, 64, 1024, 128, 0);

    BackupRequestsSimulator simulator = new BackupRequestsSimulator(new PoissonEventsArrival(200, TimeUnit.SECONDS),
        new GaussianResponseTimeDistribution(BoundedCostBackupRequestsStrategy.HIGH,
            2 * BoundedCostBackupRequestsStrategy.HIGH, BoundedCostBackupRequestsStrategy.HIGH, TimeUnit.NANOSECONDS),
        strategy);
    simulator.simulate(ITERATIONS);
    assertTrue(((100d * simulator.getNumberOfBackupRequestsMade()) / ITERATIONS) < 5 + EXPECTED_PRECISSION);
    assertTrue(strategy.getTimeUntilBackupRequestNano().get() >= BoundedCostBackupRequestsStrategy.HIGH);
  }