@Test
public void testAggregateCompleteLatency() {

    TopologyTimeSeriesMetrics.TimeSeriesComponentMetric metric = getTestMetric();
    double actual = ComponentMetricSummary.aggregateCompleteLatency(metric);
    // note that weighted average will be applied
    // 123.456 * 15.0 / (15.0 + 25.0) + 456.789 * 25.0 / (15.0 + 25.0)
    double expected = 331.789125d;
    Assert.assertEquals(expected, actual, DoubleUtils.EPSILON);
}