public static BundleCounter bundleProcessingThreadCounter(String shortId, MetricName name) {
    return new BundleProcessingThreadCounter(shortId, name);
  }
@Test
  public void testAccurateBundleCounterUsingMultipleThreads() throws Exception {
    BundleCounter bundleCounter = Metrics.bundleProcessingThreadCounter(TEST_ID, TEST_NAME);
    List<ByteString> values =
        testAccurateBundleMetricUsingMultipleThreads(bundleCounter, () -> bundleCounter.inc());
    assertTrue(values.size() >= 10);
    List<Long> sortedValues = new ArrayList<>();
    for (ByteString value : values) {
      sortedValues.add(MonitoringInfoEncodings.decodeInt64Counter(value));
    }
    Collections.sort(sortedValues);
    List<ByteString> sortedEncodedValues = new ArrayList<>();
    for (Long value : sortedValues) {
      sortedEncodedValues.add(MonitoringInfoEncodings.encodeInt64Counter(value));
    }
    assertThat(values, contains(sortedEncodedValues.toArray()));
  }