@Test
    public void testGetResponseStats() throws Exception {
        EsMetricsAccessor metrics = new EsMetricsAccessor(client);

        // s-ramp-api data
        ResponseStatsHistogramBean stats = metrics.getResponseStats("JBossOverlord", "s-ramp-api", "1.0", HistogramIntervalType.day,
                parseDate("2015-06-01"), new DateTime().withZone(DateTimeZone.UTC));
        List<ResponseStatsDataPoint> data = stats.getData();
        Assert.assertTrue(!data.isEmpty());
        Assert.assertTrue(data.size() > 1);
        Assert.assertEquals("2015-06-19T00:00:00.000Z", stats.getData().get(18).getLabel());
        Assert.assertEquals(46L, stats.getData().get(18).getTotal());
        Assert.assertEquals(0L, stats.getData().get(18).getFailures());
        Assert.assertEquals(3L, stats.getData().get(18).getErrors());

        // test/echo data
        stats = metrics.getResponseStats("Test", "echo", "1.0", HistogramIntervalType.day,
                parseDate("2015-06-01"), new DateTime().withZone(DateTimeZone.UTC));
        data = stats.getData();
        Assert.assertTrue(!data.isEmpty());
        Assert.assertTrue(data.size() > 1);
        Assert.assertEquals("2015-06-16T00:00:00.000Z", stats.getData().get(15).getLabel());
        Assert.assertEquals(214L, stats.getData().get(15).getTotal());
        Assert.assertEquals(41L, stats.getData().get(15).getFailures());
        Assert.assertEquals(2L, stats.getData().get(15).getErrors());
    }
Test method for {@link EsMetricsAccessor#getResponseStats(String, String, String, HistogramIntervalType, DateTime, DateTime)
manager/test/api/src/test/java/io/apiman/manager/test/es/EsMetricsAccessorTest.java