@Test
  public void testAddAccountWithException() throws Exception {
    when(mockAccountInsertStatement.executeBatch()).thenThrow(new BatchUpdateException());
    TestUtils.assertException(BatchUpdateException.class,
        () -> accountDao.updateAccounts(Collections.singletonList(testAccountInfo), 50), null);
  }
Utility to get a {@link MySqlDataAccessor}.
@param mockConnection the connection to use.
@return the {@link MySqlDataAccessor}.
@throws SQLException
ambry-account/src/test/java/com/github/ambry/account/mysql/AccountDaoTest.java