static AMQProtocolSession createSession() throws Exception
{
IApplicationRegistry reg = ApplicationRegistry.getInstance();
AMQCodecFactory codecFactory = new AMQCodecFactory(true);
AMQMinaProtocolSession result = new AMQMinaProtocolSession(new MockIoSession(), reg.getQueueRegistry(), reg.getExchangeRegistry(), codecFactory);
result.addChannel(new AMQChannel(1, null, null));
return result;
}