### Question:
ELConstantsFunctions { public static String toConfigurationStr(Map<String, String> map) { Configuration conf = new Configuration(false); for (Map.Entry<String, String> entry: map.entrySet()) { conf.set(entry.getKey(), entry.getValue()); } return XmlUtils.escapeCharsForXML(XmlUtils.prettyPrint(conf).toString()); }  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 testToConfigurationStr() throws Exception { Map<String, String> map = new HashMap<String, String>(); map.put("a", "A"); map.put("b", "&"); String str = ELConstantsFunctions.toConfigurationStr(map); Element e = XmlUtils.parseXml("<x>" + str + "</x>"); XConfiguration conf = new XConfiguration(new StringReader(e.getText())); Map<String, String> map2 = new HashMap<String, String>(); for (Map.Entry entry : conf) { map2.put((String) entry.getKey(), (String) entry.getValue()); } assertEquals(map, map2); }