code: public static String transform(String template, Map<String,Object> map) {
          // validations
          if(template == null) {
              return null;
          }
          if(map == null) {
              return template;
          }
  
          // transform
          List<String> nameList = new ArrayList<String>();
          nameList.addAll(map.keySet());
          for(String name : nameList) {
              template = template.replaceAll("\\$\\{" + name + "}", map.get(name).toString());
          }
          return template;
      }
docs: Template containing ${name} tags that will be replaced with the values from the map. For more advanced templating
  use something like Velocity or Freemarker. The "name" can not contain a '}' character
  @param template template string
  @param map object containing name value pairs
  @return {@code String} transformed data