Metrics { public void uploadedBytes(long byteCount) { uploadedBytes.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 uploadedBytes() { when(metricRegistry.meter(Metrics.UPLOADED_BYTES)).thenReturn(meter); new Metrics(metricRegistry).uploadedBytes(1L); verify(meter).mark(1L); }