'L{client.Resolver._connectedProtocol} is called once each time a UDP
request needs to be issued and the resulting protocol instance is used
for that request.'

def test_differentProtocol(self):

    resolver = client.Resolver(servers=[('example.com', 53)])
    protocols = []
    class FakeProtocol(object, ):
        def __init__(self):
            self.transport = StubPort()
        def query(self, address, query, timeout=10, id=None):
            protocols.append(self)
            return defer.succeed(dns.Message())
    resolver._connectedProtocol = FakeProtocol
    resolver.query(dns.Query('foo.example.com'))
    resolver.query(dns.Query('bar.example.com'))
    self.assertEqual(len(set(protocols)), 2)
