Context context = new InitialContext();
MockContextFactory.setDelegateContext( context );
final MockQueue queue = new SerializableMockQueue( QUEUE_NAME );
context.rebind( QUEUE_NAME, queue );
// inbound is to simulate a jms message arriving at a gateway endpoint.
TextMessageImpl inBoundJmsMessage = new TextMessageImpl();
inBoundJmsMessage.setJMSReplyTo( queue );
new DefaultESBPropertiesSetter().setPropertiesFromJMSMessage( inBoundJmsMessage, msg );