@Test @Ignore public void rich_replace() throws Exception { String expected = "<h3>Free Connections</h3>\n" + "<pre><code>42\n" + "</code></pre>"; String template = "### Free Connections\n ${pools[0].numconnfree}"; List<ConnectionPool> pools = new ArrayList<>(); pools.add(new ConnectionPool("anything", 42, 24, 1, 1)); Snapshot snapshot = new Snapshot.Builder().pools(pools).build(); String result = instance.processRichMessage(template, snapshot); System.out.println(result); assertEquals(expected, result); }
public String processRichMessage(String template, Snapshot snapshot) { if (template == null || template.trim().isEmpty()) { return defaultMessage; } String markdownText = replaceVariables(template, snapshot); return processMarkdown(markdownText); }
EscalationMessageProcessor { public String processRichMessage(String template, Snapshot snapshot) { if (template == null || template.trim().isEmpty()) { return defaultMessage; } String markdownText = replaceVariables(template, snapshot); return processMarkdown(markdownText); } }
EscalationMessageProcessor { public String processRichMessage(String template, Snapshot snapshot) { if (template == null || template.trim().isEmpty()) { return defaultMessage; } String markdownText = replaceVariables(template, snapshot); return processMarkdown(markdownText); }  }
EscalationMessageProcessor { public String processRichMessage(String template, Snapshot snapshot) { if (template == null || template.trim().isEmpty()) { return defaultMessage; } String markdownText = replaceVariables(template, snapshot); return processMarkdown(markdownText); }  @PostConstruct void init(); String processBasicMessage(String template, Snapshot snapshot); String processRichMessage(String template, Snapshot snapshot); }
EscalationMessageProcessor { public String processRichMessage(String template, Snapshot snapshot) { if (template == null || template.trim().isEmpty()) { return defaultMessage; } String markdownText = replaceVariables(template, snapshot); return processMarkdown(markdownText); }  @PostConstruct void init(); String processBasicMessage(String template, Snapshot snapshot); String processRichMessage(String template, Snapshot snapshot);  }