### Question:
MySQLIntervalLock extends JdbcIntervalLock { protected String buildLockTableSql(TableConfig tableConfig) { return new StringBuilder() .append("LOCK TABLES ") .append(getSafeName(tableConfig.getSchema())) .append(".") .append(getSafeName(tableConfig.getTable())) .append(" WRITE, ") .append(getSafeName(tableConfig.getSchema())) .append(".") .append(getSafeName(tableConfig.getTable())) .append(" AS dlock_read READ;") .toString(); } MySQLIntervalLock(DataSource dataSource);  MySQLIntervalLock(
      NamedParameterJdbcTemplate jdbcTemplate, DataSourceTransactionManager transactionManager);  MySQLIntervalLock(DataSource dataSource,
      TableConfig tableConfig);  MySQLIntervalLock(NamedParameterJdbcTemplate jdbcTemplate,
      DataSourceTransactionManager transactionManager, TableConfig tableConfig); @Override boolean tryLock(final LockConfig lockConfig);  }### Answer:
@Test public void builtLockTableSql() throws IOException { MySQLIntervalLock mySQLIntervalLock = new MySQLIntervalLock(dataSource); String lockTableSql = mySQLIntervalLock.buildLockTableSql(new TableConfig()); assertEquals( "LOCK TABLES `public`.`lock` WRITE, `public`.`lock` AS dlock_read READ;", lockTableSql); }