public void CanGenerateValidKey()
        {
            var key = EncryptionAndCompressionTransportDecorator.GenerateKeyBase64();

            var localInstance = new EncryptionAndCompressionTransportDecorator(sender, receiver)
                                .EnableEncryption(key);

            var toSend = new TransportMessageToSend
            {
                Label   = Guid.NewGuid().ToString(),
                Headers = new Dictionary <string, object>
                {
                    { Guid.NewGuid().ToString(), Guid.NewGuid().ToString() }
                },
                Body = Guid.NewGuid().ToByteArray(),
            };

            localInstance.Send("test", toSend, new NoTransaction());

            var receivedTransportMessage = sender.SentMessage.ToReceivedTransportMessage();

            receiver.SetUpReceive(receivedTransportMessage);

            var receivedMessage = localInstance.ReceiveMessage(new NoTransaction());

            receivedMessage.Label.ShouldBe(toSend.Label);
            var expectedHeaders = toSend.Headers.Clone();

            receivedMessage.Headers.ShouldBe(expectedHeaders);
            receivedMessage.Body.ShouldBe(toSend.Body);
        }
        protected override void DoSetUp()
        {
            sender    = new Sender();
            receiver  = new Receiver();
            transport = new EncryptionAndCompressionTransportDecorator(sender, receiver);

            Console.WriteLine(RijndaelHelper.GenerateNewKey());
        }