public AppServiceTokenHandlerTests()
 {
     this.config = new HttpConfiguration();
     this.tokenHandlerMock = new Mock<AppServiceTokenHandler>(this.config) { CallBase = true };
     this.tokenHandler = this.tokenHandlerMock.Object;
     this.credentials = new FacebookCredentials
     {
         UserId = "Facebook:1234",
         AccessToken = "abc123"
     };
 }
        public static IAppServiceTokenHandler GetAppServiceTokenHandler(this HttpConfiguration config)
        {
            if (config == null)
            {
                throw new ArgumentNullException("config");
            }

            IAppServiceTokenHandler handler;
            if (!config.Properties.TryGetValue(ServiceTokenHandlerKey, out handler))
            {
                handler = new AppServiceTokenHandler(config);
                config.Properties[ServiceTokenHandlerKey] = handler;
            }

            return handler;
        }