Calculate and return the length of the passed String. If a
MessageContext property indicates that we've received a particular
header, then double the result before returning it.
int ret = str.length();
MessageContext mc = MessageContext.getCurrentContext();
if (mc.isPropertyTrue(TestHeaderAttrs.PROP_DOUBLEIT)) {
ret = ret * 2;
}
return ret;