ToStringCounter counter = new ToStringCounter();
Map m = new HashMap();
m.put("counter", counter);
ve.evaluate(new VelocityContext(m), new StringWriter(), "foo", template);
assertEquals(1, counter.timesCalled);
}
public static class ToStringCounter {