public void TestCreation()
        {
            var fixture = new Fixture().Customize(new AutoNSubstituteCustomization());

            IGenerateReceivedMessage gen = fixture.Create <GenerateReceivedMessage>();
            var inputMessage             = fixture.Create <IMessage>();

            inputMessage.Body.Returns(new FakeMessage());
            fixture.Inject(inputMessage);
            IReceivedMessageInternal rec = fixture.Create <ReceivedMessageInternal>();

            var message = gen.GenerateMessage(typeof(FakeMessage), rec);

            IReceivedMessage <FakeMessage> translatedMessage = message;

            Assert.Equal(translatedMessage.Body, rec.Body);
            Assert.Equal(translatedMessage.CorrelationId, rec.CorrelationId);
            Assert.Equal(translatedMessage.Headers, rec.Headers);
            Assert.Equal(translatedMessage.MessageId, rec.MessageId);
        }
 /// <summary>
 /// Translates the message into a format that the user can process
 /// </summary>
 /// <param name="message">The message.</param>
 /// <returns></returns>
 public dynamic GenerateMessage(IReceivedMessageInternal message)
 {
     return(_generateMessage.GenerateMessage(_messageType, message));
 }