final MessageProvider modelAdapterProxy = new MessageProvider()
{
final MessageProvider delegate = JSONMessageServer.PROVIDER;
public Message get() {
return new MessageModelWrapper(delegate.get(),
(ModelAdapter) config.getExtensionBindings().get(ModelAdapter.class).get()
);
}
};
MessageBuilder.setMessageProvider(modelAdapterProxy);