'Test host address translation
Uses a custom Address Translator to map ip\'s of non control_connection nodes to each other
Validates AddressTranslator invocation by ensuring that metadata for mapped hosts is also mapped
@since 3.3
@jira_ticket PYTHON-69
@expected_result metadata for crossed hosts will also be crossed
@test_category metadata'

def test_address_translator_with_mixed_nodes(self):

    adder_map = {'127.0.0.1': '127.0.0.1', '127.0.0.2': '127.0.0.3', '127.0.0.3': '127.0.0.2'}
    lh_ad = LocalHostAdressTranslator(adder_map)
    c = Cluster(address_translator=lh_ad)
    c.connect()
    for host in c.metadata.all_hosts():
        self.assertEqual(adder_map.get(str(host)), host.broadcast_address)
    c.shutdown()
