@Test
void collect() {

    when(requestSizeAvg.metricValue()).thenReturn(10.0);
    var stats = new Stats();
    metrics.collect(stats);
    assertThat(stats.stats).containsEntry("kafka_producer_request_size_avg", 10.0);
}