private SqlSessionFactory getSqlSessionFactoryXmlConfig(String resource) throws Exception {
        Reader configReader = Resources.getResourceAsReader(resource);
        SqlSessionFactory sqlSessionFactory = new SqlSessionFactoryBuilder().build(configReader);
        configReader.close();

        Connection conn = sqlSessionFactory.getConfiguration().getEnvironment().getDataSource().getConnection();
        initDb(conn);

        return sqlSessionFactory;
    }
Custom collections with nested select.

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