public void SetUp()
        {
            _securityTokenMock = new Mock<IJwtSecurityToken>();
            _securityTokenHandlerMock = new Mock<IJwtSecurityTokenHandler>();
            _principalTransformerMock = new Mock<IPrincipalTransformer>();

            _textMessageWriter = new TextMessageWriter();

            _authenticationMessageHandler = new JwtAuthenticationMessageHandlerTestDouble(_securityTokenMock.Object,
                _securityTokenHandlerMock.Object);

            Thread.CurrentPrincipal = null;
            HttpContext.Current = new HttpContext(new HttpRequest("foo", "http://www.foo.com", null),
                new HttpResponse(_textMessageWriter));
        }
        public void SetUp()
        {
            _securityTokenMock        = new Mock <IJwtSecurityToken>();
            _securityTokenHandlerMock = new Mock <IJwtSecurityTokenHandler>();
            _principalTransformerMock = new Mock <IPrincipalTransformer>();

            _textMessageWriter = new TextMessageWriter();

            _authenticationMessageHandler = new JwtAuthenticationMessageHandlerTestDouble(_securityTokenMock.Object,
                                                                                          _securityTokenHandlerMock.Object);

            Thread.CurrentPrincipal = null;
            HttpContext.Current     = new HttpContext(new HttpRequest("foo", "http://www.foo.com", null),
                                                      new HttpResponse(_textMessageWriter));
        }