public void HttpClientIsReturnedWithTheCorrectHeaders() { var content = JsonConvert.SerializeObject("test"); var mockHttpMessageHandler = TestSetup.CreateMockHttpMessageHandler(HttpStatusCode.OK, content); var mockHttpClientFactory = TestSetup.CreateMockHttpClientFactory(HttpStatusCode.NotFound); var mockConfiguration = new MockConfiguration(); var mockSpotifyAuthService = new SpotifyAuthService(mockHttpClientFactory, mockConfiguration); var mockHttpClient = new HttpClient(mockHttpMessageHandler.Object); mockSpotifyAuthService.AddHeaders(mockHttpClient); Assert.Equal("application/json", mockHttpClient.DefaultRequestHeaders.Accept.ToString()); Assert.Contains("Basic", mockHttpClient.DefaultRequestHeaders.Authorization.ToString()); }