@Test
void sum() {

    var metric1 = mock(Metric.class);
    when(metric1.metricValue()).thenReturn(1d);
    var metric2 = mock(Metric.class);
    when(metric2.metricValue()).thenReturn(Double.NEGATIVE_INFINITY);
    var metrics = new ConsumerMetrics(null);
    assertThat(metrics.sum(List.of(metric1, metric1, metric2))).isEqualTo(2);
}