public static MessageContext getTestContext(String bodyText, Map<String,Entry> props) throws Exception {
TestMessageContextBuilder builder = new TestMessageContextBuilder();
builder.setBodyFromString(bodyText);
if (props != null) {
for (Map.Entry<String,Entry> mapEntry : props.entrySet()) {
builder.addEntry(mapEntry.getKey(), mapEntry.getValue());
}
}
return builder.build();
}