### Question:
StringInterpolator { public Map<String, String> interpolateValues(@Nullable Map<String, String> templates, VariableProvider provider) { if (templates == null) { return ImmutableMap.of(); } Function<String, String> transformer = transformer(provider); return Maps.transformValues(templates, transformer); }  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 testInterpolateValues() { Map<String, String> map = ImmutableMap.of( "key1", "This is ${var1}", "key2", "This is ${var2}"); Map<String, String> convertedMap = ImmutableMap.of( "key1", "This is value1", "key2", "This is value2"); assertEquals(convertedMap, interpolator.interpolateValues(map, provider)); }
@Test public void testInterpolateValuesNull() { assertEquals(ImmutableMap.<String, String>of(), interpolator.interpolateValues(null, provider)); }