public void ShouldCompressAndDecompress()
        {
            var gZipInterceptor = new GZipInterceptor();
            var body            = Encoding.UTF8.GetBytes("haha");
            var rawMessage      = new RawMessage(new MessageProperties(), body);

            Assert.AreEqual(body, gZipInterceptor.OnConsume(gZipInterceptor.OnProduce(rawMessage)).Body);
        }
        public void ShouldCompressAndDecompress()
        {
            var interceptor     = new GZipInterceptor();
            var body            = Encoding.UTF8.GetBytes("haha");
            var outgoingMessage = new ProducedMessage(new MessageProperties(), body);
            var message         = interceptor.OnProduce(outgoingMessage);
            var incomingMessage = new ConsumedMessage(null, message.Properties, message.Body);

            Assert.Equal(body, interceptor.OnConsume(incomingMessage).Body);
        }