public void RefreshTokenIfNecessary_ThreadSafe()
        {
            vThreadedTest = new ThreadedTest();
            SetupMockAccessToken(NewFabOauthAccess(), vThreadedTest.MockEntryCallback);
            vThreadedTest.RunTest(ThreadRefreshIfNecc);

            MockOauth.Verify(x =>
                             x.AccessTokenClientCredentials.Get(
                                 It.IsAny <long>(),
                                 It.IsAny <string>(),
                                 It.IsAny <string>(),
                                 SessionType.App
                                 ),
                             Times.Once()
                             );
        }
        public void RequestAuthentication_ThreadSafe()
        {
            vThreadedTest = new ThreadedTest();
            SetupMockAccessToken(NewFabOauthAccess(), vThreadedTest.MockEntryCallback);
            vThreadedTest.RunTest(ThreadRequestAuth);

            MockOauth.Verify(x =>
                             x.AccessTokenClientCredentials.Get(
                                 It.IsAny <long>(),
                                 It.IsAny <string>(),
                                 It.IsAny <string>(),
                                 SessionType.App
                                 ),
                             Times.Exactly(2)
                             );
        }