@Test
public void testWithBucketIdProvider()
        throws Exception
{

    BucketedTimeDistribution distribution = new BucketedTimeDistribution();
    distribution.setBucketIdProvider(bucketIdProvider);
    distribution.add(1_000_000);
    assertPreviousDistributionEmpty(distribution);
    ++bucketIdProvider.id;
    distribution.add(2_000_000);
    distribution.add(3_000_000);
    assertPreviousDistribution(distribution, 1, .001, .001, .001);
    ++bucketIdProvider.id;
    assertPreviousDistribution(distribution, 2, .002, .003, .005);
}