public static BundleDistribution bundleProcessingThreadDistribution(
      String shortId, MetricName name) {
    return new BundleProcessingThreadDistribution(shortId, name);
  }
@Test
  public void testAccurateBundleDistributionReportsValueFirstTimeWithoutMutations()
      throws Exception {
    Map<String, ByteString> report = new HashMap<>();
    BundleDistribution bundleDistribution =
        Metrics.bundleProcessingThreadDistribution(TEST_ID, TEST_NAME);
    bundleDistribution.updateIntermediateMonitoringData(report);
    assertEquals(
        report,
        Collections.singletonMap(
            TEST_ID, MonitoringInfoEncodings.encodeInt64Distribution(DistributionData.EMPTY)));
    report.clear();

    // Test that a reported value isn't reported again on final update
    bundleDistribution.updateFinalMonitoringData(report);
    assertEquals(report, Collections.emptyMap());

    // Test that the value is not reported after reset if no mutations after being
    // reported the first time.
    bundleDistribution.reset();
    bundleDistribution.updateFinalMonitoringData(report);
    assertEquals(report, Collections.emptyMap());
  }