"b : {"+action+"}\n" +
" ;\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, "b",
new CommonToken(ANTLRParser.ACTION,action),1);
String found = translator.translate();
assertEquals(expecting, found);