private static void initDb(Connection conn) throws IOException, SQLException {
        try {
            Reader scriptReader = Resources.getResourceAsReader("org/apache/ibatis/submitted/custom_collection_handling/CreateDB.sql");
            ScriptRunner runner = new ScriptRunner(conn);
            runner.setLogWriter(null);
            runner.setErrorLogWriter(new PrintWriter(System.err));
            runner.runScript(scriptReader);
            conn.commit();
            scriptReader.close();
        } finally {
            if (conn != null) {
                conn.close();
            }
        }
    }
Custom collections with nested select.

@throws Exception
src/test/java/org/apache/ibatis/submitted/custom_collection_handling/CustomCollectionHandlingTest.java