@Test
  public void testQueryMonthlyAggregatedStats() throws Exception {
    long readSuccessCountBefore = metrics.readSuccessCount.getCount();
    aggregatedAccountReportsDao.queryMonthlyContainerUsageForCluster(clusterName, (accountId, containerStats) -> {
      assertEquals(queryAccountId, accountId);
      assertEquals(queryContainerId, containerStats.getContainerId());
      assertEquals(queryStorageUsage, containerStats.getLogicalStorageUsage());
      assertEquals(queryStorageUsage, containerStats.getPhysicalStorageUsage());
      assertEquals(1L, containerStats.getNumberOfBlobs());
    });
    verify(mockConnection).prepareStatement(anyString());
    assertEquals("Read success count should be " + (readSuccessCountBefore + 1), (readSuccessCountBefore + 1),
        metrics.readSuccessCount.getCount());
  }
Utility to get a {@link DataSource}.
@param mockConnection the connection to use.
@return the {@link DataSource}.
@throws SQLException
ambry-mysql/src/test/java/com/github/ambry/accountstats/AggregatedAccountReportsDaoTest.java