public async Task Test_MockProvider_AuthenticateRequestAsync() { // Create a new instance of the MockProvider. IProvider provider = new MockProvider(true); // Create an empty message to authenticate. var message = new HttpRequestMessage(HttpMethod.Get, new Uri("https://graph.microsoft.com/v1/me")); // Use the provider to authenticate the message. await provider.AuthenticateRequestAsync(message); // Check for the absence of the SdkVersion header value on the empty message. bool sdkVersionHeaderExists = message.Headers.TryGetValues("SdkVersion", out _); Assert.IsFalse(sdkVersionHeaderExists, "SdkVersion header values should not exist on an empty request that does not originate from the SDK."); // Check for the authorization header Assert.IsNotNull(message.Headers.Authorization, "Authorization header was not found."); Assert.AreEqual("Bearer", message.Headers.Authorization.Scheme); Assert.AreEqual("{token:https://graph.microsoft.com/}", message.Headers.Authorization.Parameter); }