@Test
    public void testSelectListWithNestedResultMap() throws Exception {
        String xmlConfig = "org/apache/ibatis/submitted/custom_collection_handling/MapperConfig.xml";
        SqlSessionFactory sqlSessionFactory = getSqlSessionFactoryXmlConfig(xmlConfig);
        SqlSession sqlSession = sqlSessionFactory.openSession();
        try {
            List<Person> list = sqlSession.selectList("org.apache.ibatis.submitted.custom_collection_handling.PersonMapper.findWithResultMap");
            assertEquals(2, list.size());
            assertEquals(2, list.get(0).getContacts().size());
            assertEquals(1, list.get(1).getContacts().size());
            assertEquals("3 Wall Street", list.get(0).getContacts().get(1).getAddress());
        } finally {
            sqlSession.close();
        }
    }
Custom collections with nested resultMap.

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