.append("<existing-property name='property1'/>")
.append("</property>")
.append("</property-set>").toString();
Document propertySet = makeDocument(xmlConfig);
try {
PropertySet ps = new PropertySet("somename",propertySet.getDocumentElement());
NormalizedMessage inMessage = makeTestMessage("<this><is><some attr='1234'>xml123</some></is></this>");
// inMessage will have a property1=TEST_STRING
NormalizedMessage inMessage2 = makeTestMessage("<this><is><some>xml123</some></is></this>");
// inMessage2 will have a property1=TEST_STRING
NormalizedMessage outMessage = makeTestMessage(null);
ps.applyProperties(inMessage,outMessage);
assertTrue(outMessage.getProperty("testXPATH2MessagesOneHasOneHasnt.property").toString().equals("1234"));
ps.applyProperties(inMessage2,outMessage);
assertTrue(outMessage.getProperty("testXPATH2MessagesOneHasOneHasnt.property").toString().equals(TEST_STRING));
} catch (ConfigNotSupportedException e) {
e.printStackTrace();
fail(e.getLocalizedMessage());