@SuppressWarnings("unchecked")
@Test
public void testWhenCacheMissShouldReturnMetricsFromOnlyTSDBNShouldNotCallCacheService() {

	long startTime = System.currentTimeMillis()-60*60*1000, endTime = System.currentTimeMillis();
	MetricQuery query = new MetricQuery("scope", "metric", new HashMap<>(),
			startTime, endTime);
	Metric metric = new Metric("scope", "metric");
	Map<Long, Double> dps = new HashMap<>();
	dps.put(startTime,1d);
	metric.setDatapoints(dps);
	Map<MetricQuery, List<Metric>> metricsFromTSDB = new HashMap<>();
	metricsFromTSDB.put(query, Arrays.asList(metric));
	when(tsdbService.getMetrics(any())).thenReturn(metricsFromTSDB);
	Map<MetricQuery, List<Metric>> actual = cachedTSDBService.getMetrics(Arrays.asList(query));
	assertEquals(metricsFromTSDB, actual);
	verify(cacheService, never()).getRange(anySet(), anyInt(), anyInt());
}