public void MiddlewareFailure_CorrectEventContent()
        {
            var source     = new DiagnosticListener("Autofac");
            var subscriber = new MockSubscriber();

            subscriber.Enable(DiagnosticEventKeys.MiddlewareFailure);
            source.Subscribe(subscriber, subscriber.IsEnabled);

            var context = MockResolveRequestContext();

            source.MiddlewareFailure(context, Mock.Of <IResolveMiddleware>());
            var e = Assert.Single(subscriber.Events);

            Assert.Equal(DiagnosticEventKeys.MiddlewareFailure, e.Key);
            Assert.IsType <MiddlewareDiagnosticData>(e.Value);
        }