Metrics { public MetricsDump dump() { return new MetricsDump(metricRegistry.getMetrics(), additionalInfo); }  MetricsDump dump(); void addAdditionalInfoForDumps(String key, String value); Flowable<MetricsDump> dumpContinuously(Duration interval); void dumpContinuouslyToLog(Duration dumpInterval); void dumpToLog(); void register(String metricName, T metric); void register(T metric, String idPathFirst, String... idPathRemainder); boolean remove(String metricName); boolean remove(String idPathFirst, String... idPathRemainder); Meter getMeter(String metricName); Meter getMeter(String idPathFirst, String... idPathRemainder); Counter getCounter(String metricName); Counter getCounter(String idPathFirst, String... idPathRemainder); Timer getTimer(String metricName); Timer getTimer(String idPathFirst, String... idPathRemainder); Histogram getHistogram(String metricName); Histogram getHistogram(String idPathFirst, String... idPathRemainder); Gauge getGauge(String metricName); Gauge getGauge(String idPathFirst, String... idPathRemainder); Map<String, Metric> getMetrics(); static String name(String idPathFirst, String... idPathRemainder); final MetricRegistry metricRegistry; }
@Test void defaultDumpDoesntContainAdditionalInfo() { MetricsDump metricsDump = sut.dump(); MatcherAssert.assertThat(metricsDump.additionalInfo.size(), Matchers.is(0)); }