@Test public void rendersTheTemplate() throws Exception { String template = "<html>Username: %s<br>Password: %s</html>"; Object[] replacementParams = new Object[] {"someUser", "somePassword"}; String result = underTest.render(template, replacementParams); assertThat(result, is("<html>Username: someUser<br>Password: somePassword</html>")); }
public String render(String template, Object... replacementParameters) { return String.format(template, replacementParameters); }
TemplateRenderer { public String render(String template, Object... replacementParameters) { return String.format(template, replacementParameters); } }
TemplateRenderer { public String render(String template, Object... replacementParameters) { return String.format(template, replacementParameters); }  }
TemplateRenderer { public String render(String template, Object... replacementParameters) { return String.format(template, replacementParameters); }  String render(String template, Object... replacementParameters); }
TemplateRenderer { public String render(String template, Object... replacementParameters) { return String.format(template, replacementParameters); }  String render(String template, Object... replacementParameters);  }