@Test
  public void testAddAccount() throws Exception {
    int updates = 0;
    accountDao.updateAccounts(Collections.singletonList(testAccountInfo), 50);
    verify(mockAccountInsertStatement, times(++updates)).executeBatch();
    assertEquals("Write success count should be 1", updates, metrics.writeSuccessCount.getCount());
    // Run second time to reuse statement
    accountDao.updateAccounts(Collections.singletonList(testAccountInfo), 50);
    verify(mockAccountInsertStatement, times(++updates)).executeBatch();
    assertEquals("Write success count should be 2", updates, metrics.writeSuccessCount.getCount());
  }
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