Exemplo n.º 1
0
  @Test
  public void aMeteredAnnotatedMethodWithDefaultScope() throws Exception {

    final Metric metric =
        registry
            .allMetrics()
            .get(new MetricName(InstrumentedWithMetered.class, "doAThingWithDefaultScope"));
    assertMetricIsSetup(metric);

    assertThat("Metric intialises to zero", ((Meter) metric).count(), is(0L));

    instance.doAThingWithDefaultScope();

    assertThat("Metric is marked", ((Meter) metric).count(), is(1L));
  }