" ;\n");
Tool antlr = newTool();
CodeGenerator generator = new CodeGenerator(antlr, g, "Java");
g.setCodeGenerator(generator);
generator.genRecognizer(); // forces load of templates
ActionTranslator translator = new ActionTranslator(generator,"a",
new CommonToken(ANTLRParser.ACTION,action),1);
ST codeST = generator.getRecognizerST();
String code = codeST.render();
String found = code.substring(code.indexOf("###")+3,code.indexOf("!!!"));
assertEquals(expecting, found);