private String insertProperties(String template,Map<String,String> properties){
  for (  Entry<String,String> entry : properties.entrySet()) {
    template=template.replace(entry.getKey(),entry.getValue());
  }
  return template;
}

private String insertProperties ( String template , Map < String , String > properties ) { for ( Entry < String , String > entry : properties . entrySet ( ) ) { template = template . replace ( entry . getKey ( ) , entry . getValue ( ) ) ; } return template ; }
inserts properties to the template .
