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

      Parameter p = new Parameter(true, "Fli");
      List<Name> answer = sqlSession.selectList("selectNamesWithExpressions", p);
      assertEquals(3, answer.size());
      for (Name n : answer) {
        assertEquals("Flintstone", n.getLastName());
      }

      p = new Parameter(false, "Fli");
      answer = sqlSession.selectList("selectNamesWithExpressions", p);
      assertEquals(3, answer.size());
      for (Name n : answer) {
        assertTrue(n.getLastName() == null);
      }

      p = new Parameter(false, "Rub");
      answer = sqlSession.selectList("selectNamesWithExpressions", p);
      assertEquals(2, answer.size());
      for (Name n : answer) {
        assertTrue(n.getLastName() == null);
      }

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