@Test
    public void testGetClientUsagePerApi() {
        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");
        
        ClientUsagePerApiBean usage = accessor.getClientUsagePerApi("TestOrg", "TestClient", "1.0", from, to);
        Map<String, Long> expectedData = new HashMap<>();
        expectedData.put("TestApi", 15L);
        expectedData.put("OtherApi", 4L);
        Assert.assertEquals(expectedData, usage.getData());
    }
Test for {@link JdbcMetricsAccessor#getClientUsagePerApi(String, String, String, DateTime, DateTime)}
manager/api/jdbc/src/test/java/io/apiman/manager/api/jdbc/JdbcMetricsAccessorTest.java