### Question:
ELConstantsFunctions { public static String toPropertiesStr(Map<String, String> map) { Properties props = new Properties(); for (Map.Entry<String, String> entry: map.entrySet()) { props.setProperty(entry.getKey(), entry.getValue()); } return XmlUtils.escapeCharsForXML(PropertiesUtils.propertiesToString(props)); }  static Object firstNotNull(Object o1, Object o2); static String concat(String s1, String s2); static String replaceAll(String src, String regex, String replacement); static String appendAll(String src, String append, String delimeter); static String trim(String input); static String timestamp(); static String urlEncode(String input); static String toJsonStr(Map<String, String> map); static String toPropertiesStr(Map<String, String> map); static String toConfigurationStr(Map<String, String> map); static final long KB; static final long MB; static final long GB; static final long TB; static final long PB; static final int SUBMIT_MINUTES; static final int SUBMIT_HOURS; static final int SUBMIT_DAYS; }### Answer:
@Test public void testToPropertiesStr() throws Exception { Map<String, String> map = new HashMap<String, String>(); map.put("a", "A"); map.put("b", "&"); String str = ELConstantsFunctions.toPropertiesStr(map); Element e = XmlUtils.parseXml("<x>" + str + "</x>"); Properties map2 = PropertiesUtils.stringToProperties(e.getText()); assertEquals(map, map2); }