### Question:
MetricAdapter { @SuppressWarnings("MixedMutabilityReturnType") static void addBucketValues( List<MetricData.ValueAtPercentile> valueAtPercentiles, DoubleHistogramDataPoint.Builder builder) { for (MetricData.ValueAtPercentile valueAtPercentile : valueAtPercentiles) { builder.addBucketCounts((long) valueAtPercentile.getValue()); builder.addExplicitBounds(valueAtPercentile.getPercentile()); } builder.addBucketCounts(0); } private  MetricAdapter();   }### Answer:
@Test void toProtoValueAtPercentiles() { DoubleHistogramDataPoint.Builder builder = DoubleHistogramDataPoint.newBuilder(); MetricAdapter.addBucketValues(Collections.emptyList(), builder); assertThat(builder.getBucketCountsList()).containsExactly(0L); builder.clear(); MetricAdapter.addBucketValues( singletonList(MetricData.ValueAtPercentile.create(0.9, 1.1)), builder); assertThat(builder.getBucketCountsList()).containsExactly(1L, 0L); assertThat(builder.getExplicitBoundsList()).containsExactly(0.9); builder.clear(); MetricAdapter.addBucketValues( ImmutableList.of( MetricData.ValueAtPercentile.create(0.9, 1.1), MetricData.ValueAtPercentile.create(0.99, 20.3)), builder); assertThat(builder.getBucketCountsList()).containsExactly(1L, 20L, 0L); assertThat(builder.getExplicitBoundsList()).containsExactly(0.9, 0.99); }