public async Task Should_Generate_New_Trace_Id()
        {
            // Arrange
            var appContext  = new AppContextAccessorMock();
            var middleware  = new TraceIdMiddleware((innerHttpContext) => Task.CompletedTask, Options.Create(new TraceIdSettings()), appContext);
            var httpContext = new DefaultHttpContext();
            //Act
            await middleware.Invoke(httpContext);

            //Assert
            Assert.Equal(appContext.Context.TraceId, httpContext.TraceIdentifier);
        }
        public async Task Should_Reuse_Trace_Id()
        {
            // Arrange
            var appContext = new AppContextAccessorMock();
            var middleware = new TraceIdMiddleware((innerHttpContext) => Task.CompletedTask, Options.Create(new TraceIdSettings()), appContext);
            var context    = new DefaultHttpContext();

            context.Request.Headers.Add(
                new KeyValuePair <string, StringValues>(TraceIdSettings.DefaultHeader, appContext.Context.TraceId)
                );

            //Act
            await middleware.Invoke(context);

            //Assert
            Assert.Equal(appContext.Context.TraceId, context.TraceIdentifier);
        }