@Test
public void testWithBucketIdProvider()
        throws Exception
{

    BucketedDistribution distribution = new BucketedDistribution();
    distribution.setBucketIdProvider(bucketIdProvider);
    distribution.add(1);
    assertPreviousDistributionEmpty(distribution);
    ++bucketIdProvider.id;
    distribution.add(2);
    distribution.add(3);
    assertPreviousDistribution(distribution, 1, 1, 1, 1);
    ++bucketIdProvider.id;
    assertPreviousDistribution(distribution, 2, 2, 3, 5);
}