### Question:
TaskManagerSerializer { public static OMElement serializetaskManager(OMElement parent, TaskManager taskManager) { OMElement executor = fac.createOMElement("taskManager", synNS); if (taskManager.getProviderClass() != null) { executor.addAttribute(fac.createOMAttribute( "provider", nullNS, taskManager.getProviderClass())); } else { handleException("Invalid taskManager. Provider is required"); } Iterator iter = taskManager.getConfigurationProperties().keySet().iterator(); while (iter.hasNext()) { String name = (String) iter.next(); String value = (String) taskManager.getConfigurationProperties().get(name); OMElement property = fac.createOMElement("parameter", synNS); property.addAttribute(fac.createOMAttribute( "name", nullNS, name)); property.setText(value.trim()); executor.addChild(property); } if (parent != null) { parent.addChild(executor); } return executor; }  static OMElement serializetaskManager(OMElement parent, TaskManager taskManager);  }### Answer:
@Test public void testCase() throws XMLStreamException { String input = "<template xmlns=\"http: " <sequence>\n" + " <log level=\"full\">\n" + " <property xmlns:ns2=\"http: "expression=\"$func:message\"></property>\n" + " </log>\n" + " </sequence>\n" + "</template>"; OMElement element = AXIOMUtil.stringToOM(input); TaskManager taskManager = new QuartzTaskManager(); Properties properties = new Properties(); properties.setProperty("name", "testName"); taskManager.setConfigurationProperties(properties); OMElement omElement = TaskManagerSerializer.serializetaskManager(element, taskManager); Assert.assertEquals("asserting localName inserted by the method", "taskManager", omElement.getLocalName()); Iterator iter = omElement.getChildElements(); while (iter.hasNext()) { OMElementImpl impl = (OMElementImpl) iter.next(); Assert.assertEquals("asserting localName inserted by the method", "parameter", impl.getLocalName()); } }