@Test
public void testGetCompleteLatency() throws Exception {

    final long from = 1L;
    final long to = 3L;
    final Map<Long, Double> expected = generateTestPointsMap();
    // also verification
    new Expectations() {{
        mockTimeSeriesQuerier.getMetrics(
                withEqual(mockedTopologyName),
                withEqual(source.getId() + "-" + source.getName()),
                withEqual(StormMappedMetric.completeLatency.getStormMetricName()),
                withEqual(StormMappedMetric.completeLatency.getAggregateFunction()),
                withEqual(from), withEqual(to)
        );
        result = expected;
    }};
    Map<Long, Double> actual = stormTopologyTimeSeriesMetrics.getCompleteLatency(topology, source, from, to, null);
    assertEquals(expected, actual);
}