@Test
  public void testQueryStorageUsageForHostWithException() throws Exception {
    when(mockQueryStatement.executeQuery()).thenThrow(new SQLTransientConnectionException());
    TestUtils.assertException(SQLTransientConnectionException.class,
        () -> accountReportsDao.queryStorageUsageForHost(clusterName, hostname, null), null);
    assertEquals("Read failure count should be 1", 1, metrics.readFailureCount.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