### Question:
LoaderUtils { public static Map<String, String> getParams(final Element element) { @SuppressWarnings("unchecked") final List<Element> elements = element.elements("param"); final Map<String, String> params = new HashMap<String, String>(elements.size()); for (final Element paramEl : elements) { final String name = paramEl.attributeValue("name"); String value = paramEl.attributeValue("value"); if ((value == null) && (paramEl.getTextTrim() != null) && !"".equals(paramEl.getTextTrim())) { value = paramEl.getTextTrim(); } params.put(name, value); } return params; }  @Deprecated static List<ResourceDescriptor> getResourceDescriptors(final Element element); static Map<String, String> getParams(final Element element);  }### Answer:
@Test public void testMultipleParameters() throws DocumentException { Document document = DocumentHelper.parseText("<foo>" + "<param name=\"colour\">green</param>" + "<param name=\"size\" value=\"large\" />" + "</foo>"); Map params = LoaderUtils.getParams(document.getRootElement()); assertEquals(2, params.size()); assertEquals("green", params.get("colour")); assertEquals("large", params.get("size")); }