@Test
public void testAggregateExecuteLatency() {

    TopologyTimeSeriesMetrics.TimeSeriesComponentMetric metric = getTestMetric();
    double actual = ComponentMetricSummary.aggregateExecuteLatency(metric);
    // note that weighted average will be applied
    // 0.123 * 10.0 / (10.0 + 20.0) + 0.456 * 20.0 / (10.0 + 20.0)
    double expected = 0.345d;
    Assert.assertEquals(expected, actual, DoubleUtils.EPSILON);
}