@Test
    public void testGetUsagePerPlan() {
        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");
        
        UsagePerPlanBean usage = accessor.getUsagePerPlan("TestOrg", "TestApi", "1.0", from, to);
        Map<String, Long> expectedData = new HashMap<>();
        expectedData.put("Silver", 10L);
        expectedData.put("Gold", 8L);
        Assert.assertEquals(expectedData, usage.getData());
    }
Test for {@link JdbcMetricsAccessor#getUsagePerPlan(String, String, String, DateTime, DateTime)}
manager/api/jdbc/src/test/java/io/apiman/manager/api/jdbc/JdbcMetricsAccessorTest.java