### Question:
SqlScriptsUtils extends ModulePluginUtils { public static void executeBatchSql(Map<String, String> sqlMap, DataSource ds) throws SQLException { Connection conn = ds.getConnection(); Statement stat = null; try { log.debug("Execute SQL:"); conn.setAutoCommit(false); stat = conn.createStatement(); for (Entry<String, String> entry : sqlMap.entrySet()) { log.debug(entry.getValue()); try { stat.addBatch(entry.getValue()); } catch (SQLException e) { StringBuilder error = new StringBuilder("Execute SQL ERROR: " + e); error.append("\n").append("\nError SQL:\n" + entry.getValue()); error.append("\n").append("\nError line: (" + entry.getKey() + ")"); throw new SQLException(error.toString()); } } int[] rows = stat.executeBatch(); conn.commit(); log.debug("Execute SQL Rows(" + rows + ")"); } finally { if (stat != null) { stat.close(); } conn.close(); } }  static void modulesSqlScriptsInit(DataBaseType dataBaseType, DataSource ds); static void batchExcuteSqlScripts(List<Resource> resources, DataSource ds); static void excuteSqlScripts(List<Resource> resources, DataSource ds); static Map<String, String> analyzeSqlFile(InputStream input, String encoding); static Map<String, String> analyzeSqlFile(InputStream input); static Map<String, String> analyzeSqlFile(String sqlString); static Map<String, String> analyzeSqlFile(BufferedReader reader); static void executeBatchSql(Map<String, String> sqlMap, DataSource ds); static void executeSql(Map<String, String> sqlMap, DataSource ds); static String SQL_SEMICOLON; static String SQL_NOTE; }### Answer:
@Test public void testExecuteBatchSql() throws SQLException { InputStream input = this.getClass().getResourceAsStream("/sql-init-" + DataBaseType.HSQLDB + "-core.sql"); if (DataSourceUtil.getDataBaseType() != DataBaseType.HSQLDB) { SqlScriptsUtils.executeBatchSql(SqlScriptsUtils.analyzeSqlFile(input), DataSourceUtil.getDefaultDataSource()); } else { SqlScriptsUtils.executeSql(SqlScriptsUtils.analyzeSqlFile(input), DataSourceUtil.getDefaultDataSource()); } }