static MySqlDataAccessor getDataAccessor(Connection mockConnection, MySqlMetrics metrics) throws SQLException {
    Driver mockDriver = mock(Driver.class);
    when(mockDriver.connect(anyString(), any(Properties.class))).thenReturn(mockConnection);
    MySqlUtils.DbEndpoint dbEndpoint =
        new MySqlUtils.DbEndpoint("jdbc:mysql://localhost/AccountMetadata", "dc1", true, "ambry", "ambry");
    return new MySqlDataAccessor(Collections.singletonList(dbEndpoint), mockDriver, metrics);
  }
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