### Question:
MultipleMetricsMethodBean { @Counted(name = "counter", monotonic = true) @ExceptionMetered(name = "exception") @Gauge(name = "gauge") @Metered(name = "meter") @Timed(name = "timer") public String metricsMethod() { return "value"; }  @Counted(name = "counter", monotonic = true) @ExceptionMetered(name = "exception") @Gauge(name = "gauge") @Metered(name = "meter") @Timed(name = "timer") String metricsMethod();  }### Answer:
@Test @InSequence(2) public void callMetricsMethodOnce() { assertThat("Metrics are not registered correctly", registry.getMetrics().keySet(), is(equalTo(absoluteMetricNames()))); bean.metricsMethod(); assertThat("Counter count is incorrect", registry.getCounters().get(absoluteMetricName("counter")).getCount(), is(equalTo(1L))); assertThat("Meter count is incorrect", registry.getMeters().get(absoluteMetricName("exception")).getCount(), is(equalTo(0L))); assertThat("Meter count is incorrect", registry.getMeters().get(absoluteMetricName("meter")).getCount(), is(equalTo(1L))); assertThat("Timer count is incorrect", registry.getTimers().get(absoluteMetricName("timer")).getCount(), is(equalTo(1L))); assertThat("Gauge value is incorrect", registry.getGauges().get(absoluteMetricName("gauge")).getValue(), hasToString((equalTo("value")))); }