### Question:
PropertyHelper { public static void setStaticProperty(OMElement property, Object o) { if (property.getLocalName().toLowerCase().equals("property")) { String propertyName = property.getAttributeValue(new QName("name")); String mName = "set" + Character.toUpperCase(propertyName.charAt(0)) + propertyName.substring(1); if (property.getAttributeValue(new QName("value")) != null) { String value = property.getAttributeValue(new QName("value")); try { Method method = o.getClass().getMethod(mName, String.class); if (log.isDebugEnabled()) { log.debug("Setting property :: invoking method " + mName + "(" + value + ")"); } method.invoke(o, value); } catch (Exception e) { handleException("Error setting property : " + propertyName + " as a String property into class mediator : " + o.getClass() + " : " + e.getMessage(), e); } } else { OMElement value = property.getFirstElement(); if (value != null) { try { Method method = o.getClass().getMethod(mName, OMElement.class); if (log.isDebugEnabled()) { log.debug("Setting property :: invoking method " + mName + "(" + value + ")"); } method.invoke(o, value); } catch (Exception e) { handleException("Error setting property : " + propertyName + " as an OMElement property into class mediator : " + o.getClass() + " : " + e.getMessage(), e); } } } } }  static void setInstanceProperty(String name, Object val, Object obj); static void setStaticProperty(OMElement property, Object o); static boolean isStaticProperty(OMElement property);  }### Answer:
@Test public void testSetStaticProperty() throws XMLStreamException { OMElement element = AXIOMUtil.stringToOM(STATIC_XML); PojoClass pojoInstance = new PojoClass(); PropertyHelper.setStaticProperty(element, pojoInstance); Assert.assertEquals(SAMPLE_STRING, pojoInstance.getStringParameter()); String sampleProp = "SampleProp"; String input = "<property xmlns:ns2=\"http: "name=\"omElementParameter\"><" + sampleProp + ">SampleValue</" + sampleProp + "></property>\n"; element = AXIOMUtil.stringToOM(input); PropertyHelper.setStaticProperty(element, pojoInstance); OMElement result = pojoInstance.getOmElementParameter(); Assert.assertNotNull("new OMElement should be inserted", result); Assert.assertEquals("asserting the localName of OMElement", sampleProp, result.getLocalName()); }