'Once the TTL has been exceeded, the result is removed from the cache.'

def test_cachedResultExpires(self):

    r = ([dns.RRHeader('example.com', dns.A, dns.IN, 60, dns.Record_A('127.0.0.1', 60))], [dns.RRHeader('example.com', dns.A, dns.IN, 50, dns.Record_A('127.0.0.1', 50))], [dns.RRHeader('example.com', dns.A, dns.IN, 40, dns.Record_A('127.0.0.1', 40))])
    clock = task.Clock()
    c = cache.CacheResolver(reactor=clock)
    query = dns.Query(name='example.com', type=dns.A, cls=dns.IN)
    c.cacheResult(query, r)
    clock.advance(40)
    self.assertNotIn(query, c.cache)
    return self.assertFailure(c.lookupAddress('example.com'), dns.DomainError)
