### Question:
StringInterpolator { public String interpolate(String template, final Map<String, ?> variables) { return interpolate(template, new VariableProvider() { public String provide(String variableName) { Object value = variables.get(variableName); if (value == null) { return null; } return value.toString(); } }); }  String interpolate(String template,
                            final Map<String, ?> variables); String interpolate(String template,
                            VariableProvider provider); Set<String> getVariables(String template); Map<String, String> interpolateValues(@Nullable Map<String, String> templates,
                                               VariableProvider provider); List<String> interpolateList(@Nullable List<String> templates,
                                      VariableProvider provider);  }### Answer:
@Test public void testInterpolate() { assertEquals("My value1 is value2", format("My ${var1} is ${var2}")); }