public async void when_no_exception_then_invoke_once()
        {
            var counthandler = new FakeHandler();
            var sut          = new AsynchronousMemoryCommandBus(new JsonTextSerializer(), counthandler);

            await sut.SendAwaitable(new RegisterAccount());

            Assert.That(counthandler.Invocation, Is.EqualTo(1));
        }
        public async void when_exception_then_invoke_retry()
        {
            var counthandler = new FakeHandler(true);
            var sut          = new AsynchronousMemoryCommandBus(new JsonTextSerializer(), counthandler);

            var envelope = new Envelope <ICommand>(new RegisterAccount());

            envelope.RetryCount = 3;
            await sut.SendAwaitable(envelope);

            Assert.That(counthandler.Invocation, Is.EqualTo(3));
        }