@Test public void basic_replace_nothing() throws Exception { String expected = "This is a test"; Snapshot escalation = mock(Snapshot.class); String result = instance.processBasicMessage(expected, escalation); assertEquals(expected, result); }
public String processBasicMessage(String template, Snapshot snapshot) { if (template == null || template.trim().isEmpty()) { return defaultMessage; } return replaceVariables(template, snapshot); }
EscalationMessageProcessor { public String processBasicMessage(String template, Snapshot snapshot) { if (template == null || template.trim().isEmpty()) { return defaultMessage; } return replaceVariables(template, snapshot); } }
EscalationMessageProcessor { public String processBasicMessage(String template, Snapshot snapshot) { if (template == null || template.trim().isEmpty()) { return defaultMessage; } return replaceVariables(template, snapshot); }  }
EscalationMessageProcessor { public String processBasicMessage(String template, Snapshot snapshot) { if (template == null || template.trim().isEmpty()) { return defaultMessage; } return replaceVariables(template, snapshot); }  @PostConstruct void init(); String processBasicMessage(String template, Snapshot snapshot); String processRichMessage(String template, Snapshot snapshot); }
EscalationMessageProcessor { public String processBasicMessage(String template, Snapshot snapshot) { if (template == null || template.trim().isEmpty()) { return defaultMessage; } return replaceVariables(template, snapshot); }  @PostConstruct void init(); String processBasicMessage(String template, Snapshot snapshot); String processRichMessage(String template, Snapshot snapshot);  }