The problem comes from FreemarkerManager calling
beansWrapper.setSimpleMapWrapper(false);
This makes the hash builtins (
http://freemarker.org/docs/ref_builtins_hash.html ) unavailable, but makes plain method calls possible. Setting this to true makes builtins available, but no method calls possible.
Here's a patch that allows both.
See the test case to see how it currently fails and how this solves it, while retaining the ability to use plain method calls on the maps.
However, you'll see these stubs are not really needed : the main assert method (asserting a template's result equals expected text output) calls a second one which does the same test but using FreemarkerManager, and it's only there those stubs are used. That part of the test is useful - just to avoid regression if one modifies the way FreemarkerManager handles the WWBeanWrapper for instance), but might be more an IT than UT ?
Let me know what you think.