public void CreateGetBreachedAccount()
        {
            var breachLink = new BreachedAccountLink()   // Uses path segment versioning
            {
                Account = "*****@*****.**"
            };

            HttpRequestMessage request = breachLink.CreateRequest();

            Assert.Equal(HttpMethod.Get, request.Method);
            Assert.Equal("https://haveibeenpwned.com/api/v2/breachedaccount/bar%40foo.com", request.RequestUri.AbsoluteUri);
        }
        public async Task<IEnumerable<BreachMessage>> GetBreachedAccountAsync(string account, string domain = null)
        {
            var link = new BreachedAccountLink()
            {
                Account = account,
                Domain = domain
            };
            IEnumerable<BreachMessage> bam = null;

            var machine = HibpMachineFactory.CreateMachine();
            machine.AddResponseAction(async (m, l, r) => { /* NOOP */ }, System.Net.HttpStatusCode.NotFound);
            machine.AddResponseAction(async (m, l, r) => { throw new ArgumentException(); }, System.Net.HttpStatusCode.BadRequest);
            machine.AddResponseAction<IEnumerable<BreachMessage>>((l, ba) => { bam = ba; }, System.Net.HttpStatusCode.OK);
            
            await _httpClient.FollowLinkAsync(link,machine);

            return bam;

        }
        public void CreateGetBreachedAccountForADomainTruncated()
        {
            var breachLink = new BreachedAccountLink()   // Uses path segment versioning
            {
                Account = "*****@*****.**",
                Domain = "foobar.com",
                TruncateResponse = true
            };

            HttpRequestMessage request = breachLink.CreateRequest();

            Assert.Equal(HttpMethod.Get, request.Method);
            Assert.Equal("https://haveibeenpwned.com/api/v2/breachedaccount/bar%40foo.com?truncateResponse=True&domain=foobar.com", request.RequestUri.AbsoluteUri);
        }