public async Task AddMessageRejectsUnauthorizedRequestsWith401Error()
        {
            var timelineRepositoryMock = new Mock <ITimelineRepository>();
            var loggerMock             = new Mock <ILogger <TimelineController> >();
            var httpContext            = new Microsoft.AspNetCore.Http.DefaultHttpContext(); // or mock a `HttpContext`
            var controllerContext      = new ControllerContext()
            {
                HttpContext = httpContext,
            };

            var controller = new TimelineController(timelineRepositoryMock.Object, loggerMock.Object)
            {
                ControllerContext = controllerContext
            };

            var res = await controller.AddMessage(new TimelineController.MessageCreate {
                content = "hello"
            }, "testUser");

            Assert.IsType <UnauthorizedResult>(res);
        }
        public async Task AddMessageExecutesRequestMadeWithSimulatorHeader()
        {
            var timelineRepositoryMock = new Mock <ITimelineRepository>();
            var loggerMock             = new Mock <ILogger <TimelineController> >();
            var httpContext            = new Microsoft.AspNetCore.Http.DefaultHttpContext(); // or mock a `HttpContext`

            httpContext.Request.Headers["Authorization"] = AuthorizationConstants.terribleHackAuth;
            var controllerContext = new ControllerContext()
            {
                HttpContext = httpContext,
            };

            var controller = new TimelineController(timelineRepositoryMock.Object, loggerMock.Object)
            {
                ControllerContext = controllerContext
            };

            var res = await controller.AddMessage(new TimelineController.MessageCreate {
                content = "hello"
            }, "testUser");

            Assert.IsType <NoContentResult>(res);
        }