@Test
  public void testDynamicSelectWithIteration() {
    SqlSession sqlSession = sqlSessionFactory.openSession();
    try {

      int[] ids = { 2, 4, 5 };
      Map<String, Object> param = new HashMap<String, Object>();
      param.put("ids", ids);
      List<Name> answer = sqlSession.selectList("selectNamesWithIteration", param);
      assertEquals(3, answer.size());
      for (int i = 0; i < ids.length; i++) {
        assertEquals(ids[i], answer.get(i).getId());
      }

    } finally {
      sqlSession.close();
    }
  }
Just a test case. Not a real Velocity implementation.
src/test/java/org/apache/ibatis/submitted/language/LanguageTest.java