### Question:
BundleReporter extends AbstractPollingReporter implements MetricProcessor<String>, AutoCloseable { @Override public void processCounter(MetricName name, Counter counter, String x) throws IOException { sendMetricData(sanitizeName(name), create(counter.count()), "counter", ""); } @JsonCreator  BundleReporter(@JsonProperty("output") TaskDataOutput output,
                          @JsonProperty("name")   AutoField name,
                          @JsonProperty("value")  AutoField value,
                          @JsonProperty("group")  AutoField group,
                          @JsonProperty("units")  AutoField units,
                          @Time(TimeUnit.NANOSECONDS)
                          @JsonProperty("period") long period);  BundleReporter(TaskDataOutput output,
                          AutoField name,
                          AutoField value,
                          AutoField group,
                          AutoField units,
                          long period,
                          TimeUnit periodUnit,
                          MetricsRegistry metricsRegistry); void start(); @Override void close(); @Override void run(); @Override void processGauge(MetricName name, Gauge<?> gauge, String x); @Override void processCounter(MetricName name, Counter counter, String x); @Override void processMeter(MetricName name, Metered meter, String x); @Override void processHistogram(MetricName name, Histogram histogram, String x); @Override void processTimer(MetricName name, Timer timer, String x);  }### Answer:
@Test public void reportsCounterValues() throws Exception { final Counter counter = mock(Counter.class); when(counter.count()).thenReturn(100L); reporter.processCounter(name("counter"), counter, null); verify(output).send(decode("name = t.test.counter, value = 100, group = counter, units = \"\"")); }