@Test (expected = RuntimeException.class)
public void testGetMetricsExceedingLimit(){

	MetricQuery metricQuery = new MetricQuery("scope1", "metric1", null, 1557809359L, 1557809599L);
	metricQuery.setTag("topic", "topic");
	metricQuery.setDownsampler(MetricQuery.Aggregator.MAX);
	metricQuery.setDownsamplingPeriod(5 * 60 * 1000L);
	List<MetricQuery> queries = new ArrayList<>();
	queries.add(metricQuery);
	ElasticSearchConsumerOffsetMetricsService spyService = null;
	try {
		spyService = _initializeSpyService(esConsumerOffsetMetricsService, getReply, false);
	} catch (IOException e) {
		fail();
	}
	Whitebox.setInternalState(spyService, "INDEX_MAX_RESULT_WINDOW", 1);
	spyService.getMetrics(queries);
}