SingleRowInterpreterResult { public String toHtml() { StringBuilder builder = new StringBuilder(); builder.append("%html "); String outputText = template; for (int i = 0; i < values.size(); ++i) { outputText = outputText.replace("{" + i + "}", values.get(i).toString()); } builder.append(outputText); return builder.toString(); } SingleRowInterpreterResult(List values, String template, InterpreterContext context); String toHtml(); String toAngular(); void pushAngularObjects();  }
@Test public void testHtml() { List list = Lists.newArrayList("2020-01-01", 10); String template = "Total count:{1} for {0}"; InterpreterContext context = InterpreterContext.builder().build(); SingleRowInterpreterResult singleRowInterpreterResult = new SingleRowInterpreterResult(list, template, context); String htmlOutput = singleRowInterpreterResult.toHtml(); assertEquals("%html Total count:10 for 2020-01-01", htmlOutput); }