public void testComplex() throws MustacheException, IOException {
StringWriter json = new StringWriter();
MappingJsonFactory jf = new MappingJsonFactory();
final JsonGenerator jg = jf.createJsonGenerator(json);
jg.writeStartObject();
final JsonCapturer captured = new JsonCapturer(jg);
MustacheFactory c = new DefaultMustacheFactory(root) {
@Override
public MustacheVisitor createMustacheVisitor() {
return new CapturingMustacheVisitor(this, captured);
}