'L{server.DNSServerFactory.gotResolverResponse} caches the response if at
least one cache was provided in the constructor.'

def test_gotResolverResponseCaching(self):

    f = NoResponseDNSServerFactory(caches=[RaisingCache()])
    m = dns.Message()
    m.addQuery('example.com')
    expectedAnswers = [dns.RRHeader()]
    expectedAuthority = []
    expectedAdditional = []
    e = self.assertRaises(RaisingCache.CacheResultArguments, f.gotResolverResponse, (expectedAnswers, expectedAuthority, expectedAdditional), protocol=NoopProtocol(), message=m, address=None)
    ((query, (answers, authority, additional)), kwargs) = e.args
    self.assertEqual(query.name.name, 'example.com')
    self.assertIs(answers, expectedAnswers)
    self.assertIs(authority, expectedAuthority)
    self.assertIs(additional, expectedAdditional)
