@Test
  public void testQueryStorageUsageForHost() throws Exception {
    accountReportsDao.queryStorageUsageForHost(clusterName, hostname,
        (partitionId, accountId, containerStats, updatedAt) -> {
          assertEquals("Partition id mismatch", queryPartitionId, partitionId);
          assertEquals("Account id mismatch", queryAccountId, accountId);
          assertEquals("Container id mismatch", queryContainerId, containerStats.getContainerId());
          assertEquals("Storage usage mismatch", queryStorageUsage, containerStats.getLogicalStorageUsage());
          assertEquals("Physical storage usage mismatch", queryStorageUsage, containerStats.getPhysicalStorageUsage());
          assertEquals("Number of blobs mismatch", 1L, containerStats.getNumberOfBlobs());
        });
    verify(mockConnection).prepareStatement(anyString());
    assertEquals("Read success count should be 1", 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/AccountReportsDaoTest.java