@Test
void evaluateVelocityCount() throws XWikiVelocityException
{

    this.engine.initialize(new Properties());
    assertEvaluate("1true2true3true4true5false", "#foreach($nb in [1,2,3,4,5])$velocityCount$velocityHasNext#end",
        DEFAULT_TEMPLATE_NAME);
    assertEquals("Deprecated binding [$velocityCount] used in [mytemplate]", logCapture.getMessage(0));
    assertEquals("Deprecated binding [$velocityHasNext] used in [mytemplate]", logCapture.getMessage(1));
    assertEquals("Deprecated binding [$velocityCount] used in [mytemplate]", logCapture.getMessage(2));
    assertEquals("Deprecated binding [$velocityHasNext] used in [mytemplate]", logCapture.getMessage(3));
    assertEquals("Deprecated binding [$velocityCount] used in [mytemplate]", logCapture.getMessage(4));
    assertEquals("Deprecated binding [$velocityHasNext] used in [mytemplate]", logCapture.getMessage(5));
    assertEquals("Deprecated binding [$velocityCount] used in [mytemplate]", logCapture.getMessage(6));
    assertEquals("Deprecated binding [$velocityHasNext] used in [mytemplate]", logCapture.getMessage(7));
    assertEquals("Deprecated binding [$velocityCount] used in [mytemplate]", logCapture.getMessage(8));
    assertEquals("Deprecated binding [$velocityHasNext] used in [mytemplate]", logCapture.getMessage(9));
}