public void when_executing_without_context_it_should_fail()
        {
            var step = new SerializeMessageStep();
            // ReSharper disable once AssignNullToNotNullAttribute - it's a test against null.
            Func <Task> sut = () => step.Execute(context: null);

            sut.Should().Throw <ArgumentNullException>().Where(exception => exception.ParamName.Equals("context"));
        }
        public async Task when_executing_it_should_serialize_message_into_byte_array()
        {
            const byte expected = 0x23;
            var        context  = new MessagePublishingContext {
                Api = CreateEgressApi(), Message = new Message1 {
                    Byte = expected
                }
            };
            var sut = new SerializeMessageStep();

            await sut.Execute(context);

            ((byte[])context.Payload)[0].Should().Be(expected, "message content should be serialized");
        }