@Test
public void testAggregateProcessLatency() {

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