@Test
  public void testUpdateStorageUsage() throws Exception {
    short partitionId = 1;
    short accountId = 100;
    short containerId = 8;
    long storageUsage = 100000;
    accountReportsDao.updateStorageUsage(clusterName, hostname, partitionId, accountId, containerId, storageUsage);
    verify(mockConnection).prepareStatement(anyString());
    assertEquals("Write success count should be 1", 1, metrics.writeSuccessCount.getCount());
    // Run second time to reuse statement
    accountReportsDao.updateStorageUsage(clusterName, hostname, partitionId, accountId, containerId, storageUsage);
    assertEquals("Write success count should be 2", 2, metrics.writeSuccessCount.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