### Question:
FrequencyBucketDistribution { public List<Bucket> getDistribution() { return orderedBuckets; } FrequencyBucketDistribution(final List<BigDecimal> buckets); void addPoint(final BigDecimal point); List<Bucket> getDistribution();  }### Answer:
@Test public void testNullBucket() { FrequencyBucketDistribution bucket = new FrequencyBucketDistribution(null); assertThat(bucket.getDistribution()).isEmpty(); }
@Test public void testEmptyBucket() { FrequencyBucketDistribution bucket = new FrequencyBucketDistribution(Collections.emptyList()); assertThat(bucket.getDistribution()).hasSize(1); assertThat(bucket.getDistribution().get(0).isUpperLimit()).isTrue(); }
@Test public void testOneBucketNoPoint() { List<BigDecimal> buckets = new ArrayList<>(); buckets.add(BigDecimal.ONE); FrequencyBucketDistribution bucket = new FrequencyBucketDistribution(buckets); assertThat(bucket.getDistribution()).hasSize(2); assertThat(bucket.getDistribution().get(0).getBucket()).isEqualByComparingTo("1"); }