public async Task AuthenticateIncludesCorrectHeaders()
        {
            var creds  = GetValidCredentials();
            var client = new IdentityServiceRestClient(creds, CancellationToken.None, this.ServiceLocator);

            await client.Authenticate();

            Assert.IsTrue(this.simulator.Headers.ContainsKey("Accept"));
            Assert.AreEqual("application/json", this.simulator.Headers["Accept"]);
            Assert.AreEqual("application/json", this.simulator.ContentType);
        }
        public async Task AuthenticateIncludesPayload()
        {
            var creds  = GetValidCredentials();
            var client = new IdentityServiceRestClient(creds, CancellationToken.None, this.ServiceLocator);

            await client.Authenticate();

            Assert.IsNotNull(this.simulator.Content);

            var content = TestHelper.GetStringFromStream(this.simulator.Content);

            Assert.IsTrue(content.Length > 0);
        }