public static String substituteTemplateVariables(String s, Collection<? extends TemplateVariable> variables) throws Exception {
    return substituteTemplateVariables(s, variables, true);
  }
public static String substituteTemplateVariables(String s, Collection<? extends TemplateVariable> variables)