@Test
public void renderToJSON() throws Exception {
final StringWriter out = new StringWriter();
final TemplateHelper helper = new TemplateHelper(new PrintWriter(out), Collections.<String, Object>emptyMap());
final Template template = Format.Defaults.JSON.render(Collections.<String, Object>emptyMap());
helper.renderPlain(template.getTemplate(), template.getUserParams());
assertEquals("{\"counters\":[" +
" {\"name\":\"RendererTest\", \"role\":\"failures\",\"unit\":\"u\",\"Hits\":\"1.0\",\"Max\":\"1.0\",\"Mean\":\"1.0\",\"Min\":\"1.0\"," +
"\"StandardDeviation\":\"0.0\",\"Sum\":\"1.0\",\"Variance\":\"0.0\"," +
"\"Value\":\"1.0\",\"Concurrency\":\"0.0\",\"MaxConcurrency\":\"1.0\"} ]}", inline(out));