'Assert that the DNS response C{querying} will eventually fire with
contains exactly a certain collection of records.
@param querying: A L{Deferred} returned from one of the DNS client
I{lookup} methods.
@param expectedRecords: A L{list} of L{IRecord} providers which must be
in the response or the test will be failed.
@return: A L{Deferred} that fires when the assertion has been made.  It
fires with a success result if the assertion succeeds and with a
L{Failure} if it fails.'

def namesTest(self, querying, expectedRecords):

    def checkResults(response):
        receivedRecords = justPayload(response)
        self.assertEqual(set(expectedRecords), set(receivedRecords))
    querying.addCallback(checkResults)
    return querying
