@Test
void collectWithoutRequestSizeAvg() {

    when(requestSizeAvg.metricValue()).thenReturn(Double.NaN);
    var stats = new Stats();
    metrics.collect(stats);
    assertThat(stats.stats).doesNotContainKeys("kafka_producer_request_size_avg");
}