public async Task DoesRemoveEmptySpacesAsync()
        {
            ArgumentPackBuilder builder = new ArgumentPackBuilder();
            TestContextObject   context = new TestContextObject();

            context.SetQuery("test  string");

            await builder.CheckAsync(null, context, () => default);

            Assert.Equal(2, context.GetArgumentPack().Pack.Length);
            Assert.Equal("test", context.GetArgumentPack().Pack.Take());
            Assert.Equal("string", context.GetArgumentPack().Pack.Take());
        }
        public async Task TestWithValidContextAsync(string prefix)
        {
            var funcMock    = new Mock <Func <ValueTask> >();
            var serviceMock = new Mock <IPrefixService>();

            serviceMock.Setup(x => x.MatchAsync(It.IsAny <IContext>()))
            .Returns(new ValueTask <string>(prefix));

            var stage = new PipelineStageTrigger(serviceMock.Object);

            var context = new TestContextObject();

            context.SetQuery(prefix + "ping");

            await stage.CheckAsync(null, context, funcMock.Object);

            funcMock.Verify(x => x.Invoke(), Times.Once, "Didn't invoke next()");

            Assert.Equal("ping", context.GetQuery());
            Mock.Verify(funcMock);
        }