SingleRowInterpreterResult { public String toAngular() { StringBuilder builder = new StringBuilder(); builder.append("%angular "); String outputText = template; for (int i = 0; i < values.size(); ++i) { outputText = outputText.replace("{" + i + "}", "{{value_" + i + "}}"); } builder.append(outputText); return builder.toString(); } SingleRowInterpreterResult(List values, String template, InterpreterContext context); String toHtml(); String toAngular(); void pushAngularObjects();  }
@Test public void testAngular() { 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 angularOutput = singleRowInterpreterResult.toAngular(); assertEquals("%angular Total count:{{value_1}} for {{value_0}}", angularOutput); }