@Test
public void testReportToLog() throws Exception {

	when(corePlugin.isOnlyLogElasticsearchMetricReports()).thenReturn(true);
	elasticsearchReporter.reportMetrics(
			metricNameMap(name("gauge").build(), gauge(1)),
			metricNameMap(Counter.class),
			metricNameMap(Histogram.class),
			metricNameMap(Meter.class),
			metricNameMap(Timer.class));
	verify(metricsLogger).info(eq(String.format("{\"index\":{\"_index\":\"stagemonitor-metrics-%s\",\"_type\":\"metrics\"}}\n" +
			"{\"@timestamp\":%d,\"name\":\"gauge\",\"app\":\"test\",\"value\":1.0}\n", StringUtils.getLogstashStyleDate(), timestamp)));
}