public object Any(ShortCircuitImpl request)
        {
            if (Request.HasValidCache(request.ETag, request.LastModified))
            {
                return(HttpResult.NotModified());
            }

            return(new HttpResult(request)
            {
                Age = request.Age,
                ETag = request.ETag,
                MaxAge = request.MaxAge,
                Expires = request.Expires,
                LastModified = request.LastModified,
                CacheControl = request.CacheControl.GetValueOrDefault(CacheControl.None),
            });
        }
        public void Does_bypass_short_circuit_Service_implementation_when_ETag_not_matches()
        {
            var client = GetClient();

            client.RequestFilter = req =>
                                   req.Headers[HttpHeaders.IfNoneMatch] = "etag".Quoted();

            client.ResponseFilter = res =>
                                    Assert.That(res.Headers[HttpHeaders.Age], Is.EqualTo("86400"));

            var request = new ShortCircuitImpl
            {
                ETag = "etag-alt",
                Age  = TimeSpan.FromDays(1)
            };
            var response = client.Get(request);

            Assert.That(response, Is.EqualTo(request));
        }