'An attempt is made to transfer the zone for the domain the
L{SecondaryAuthority} was constructed with from the server address it
was constructed with when L{SecondaryAuthority.transfer} is called.'

def test_transfer(self):

    secondary = SecondaryAuthority.fromServerAddressAndDomain(('192.168.1.2', 1234), 'example.com')
    secondary._reactor = reactor = MemoryReactorClock()
    secondary.transfer()
    (host, port, factory, timeout, bindAddress) = reactor.tcpClients.pop(0)
    self.assertEqual(host, '192.168.1.2')
    self.assertEqual(port, 1234)
    proto = factory.buildProtocol((host, port))
    transport = StringTransport()
    proto.makeConnection(transport)
    msg = Message()
    msg.decode(BytesIO(transport.value()[2:]))
    self.assertEqual([dns.Query('example.com', dns.AXFR, dns.IN)], msg.queries)
