MetricsConverter { abstract public Stream<Metric> getMetrics(T meter);  abstract Stream<Metric> getMetrics(T meter); static TimeUnit getBaseTimeUnit();  }
@Test public void testGetMetrics() { Stream<Metric> metricsStream = converter.getMetrics(meter); List<Metric> metrics = metricsStream.collect(Collectors.toList()); assertResult(metrics); }
@Test public void getPercentileMetrics() { ValueAtPercentile[] percentiles = new ValueAtPercentile[] { new ValueAtPercentile(2.5, 2.0) }; Stream<Metric> metricsStream = converter.getMetrics(meter, percentiles); List<Metric> metrics = metricsStream.collect(Collectors.toList()); assertEquals(1, metrics.size()); assertTrue(statisticTagExists(metrics, "250percentile")); }