Metrics { public void consumedBytes(long byteCount) { consumedBytes.mark(byteCount); } @Autowired  Metrics(MetricRegistry registry); void consumedBytes(long byteCount); void uploadedBytes(long byteCount); void uploadedEvents(long eventCount); void offsetHighwaterMark(int partition, long offset);  }
@Test public void consumedBytes() { when(metricRegistry.meter(Metrics.CONSUMED_BYTES)).thenReturn(meter); new Metrics(metricRegistry).consumedBytes(1L); verify(meter).mark(1L); }