this.messageContext.config().change().messageInterpolator(new ELAwareMessageInterpolator(new TestELProvider()));
Number arg1 = new BigDecimal("123.4567");
Date arg2 = new Date();
String text = "#1: {arg1} and #2: {arg2}";
Message message1 = this.messageContext.message().text(text)
.namedArgument("arg1", arg1).namedArgument("arg2", arg2).create();
Map<String, Serializable> arguments = new HashMap<String, Serializable>();
arguments.put("arg1", arg1);
arguments.put("arg2", arg2);
Message message2 = new DefaultMessage(text, NamedArguments.convert(arguments));
((MessageContextConfigAware)message2).setMessageContextConfig(this.messageContext.config());
assertEquals(message1, message2);
assertEquals(message1.toString(), message2.toString());
assertEquals(message1.toString(this.messageContext), message2.toString(this.messageContext));
}