@Test
    public void testGetResponseStatsPerClient() {
        Map<String, String> config = new HashMap<>();
        config.put("datasource.jndi-location", DB_JNDI_LOC);
        JdbcMetricsAccessor accessor = new JdbcMetricsAccessor(config);

        DateTime from = ISODateTimeFormat.dateTimeNoMillis().withZone(DateTimeZone.UTC).parseDateTime("2016-02-01T00:00:00Z");
        DateTime to = ISODateTimeFormat.dateTimeNoMillis().withZone(DateTimeZone.UTC).parseDateTime("2016-03-01T00:00:00Z");
        ResponseStatsPerClientBean stats = accessor.getResponseStatsPerClient("TestOrg", "TestApi", "1.0", from, to);
        ResponseStatsDataPoint dataPoint = stats.getData().get("TestClient");
        Assert.assertNotNull(dataPoint);
        Assert.assertEquals(16, dataPoint.getTotal());
        Assert.assertEquals(3, dataPoint.getFailures());
        Assert.assertEquals(1, dataPoint.getErrors());

        dataPoint = stats.getData().get("OtherClient");
        Assert.assertNotNull(dataPoint);
        Assert.assertEquals(2, dataPoint.getTotal());
        Assert.assertEquals(0, dataPoint.getFailures());
        Assert.assertEquals(0, dataPoint.getErrors());
    }
Test for {@link JdbcMetricsAccessor#getResponseStatsPerClient(String, String, String, DateTime, DateTime)}
manager/api/jdbc/src/test/java/io/apiman/manager/api/jdbc/JdbcMetricsAccessorTest.java