@Test
void evaluateWithSubEvaluate() throws XWikiVelocityException
{

    this.engine.initialize(new Properties());
    Context context = new XWikiVelocityContext();
    context.put("test", new TestClass(context));
    assertEvaluate("top", "#set($var = 'top')$test.evaluate('$var')", context);
    assertEvaluate("sub", "$test.evaluate('#set($var = \"sub\")')$var", context);
    assertEvaluate("sub", "#set($var = 'top')$test.evaluate('#set($var = \"sub\")')$var", context);
    // TODO: update this test when a decision is taken in Velocity side regarding macro context behavior
    // See
    // https://mail-archives.apache.org/mod_mbox/velocity-dev/202001.mbox/%3cCAPnKnLHmL2oeYBNHvq3FHO1BmFW0DFjChk6sxXb9s+mwKhxirQ@mail.gmail.com%3e
    // assertEvaluate("local",
    // "#macro(mymacro)#set($var = 'local')$test.evaluate('#set($var = \"global\")')$var#end#mymacro()", context);
}