async def METHOD_NAME(logger, metrics, port_generator):
    head_port = port_generator()
    head_address = f'0.0.0.0:{head_port}'
    head_deployment = 'head'
    connection_pool = _ConnectionPoolMap(
        runtime_name=head_deployment,
        logger=logger,
        metrics=metrics,
        histograms=_NetworkingHistograms(),
    )
    connection_pool.add_head(
        deployment=head_deployment, address=head_address, head_id=0
    )
    replica_list = connection_pool.get_replicas(deployment=head_deployment, head=True)
    assert replica_list.has_connections()
    assert len(replica_list.get_all_connections()) == 1
    assert not connection_pool.get_replicas(deployment=head_deployment, head=False)
    await connection_pool.remove_head(deployment=head_deployment, address=head_address)
    assert not connection_pool.get_replicas(deployment=head_deployment, head=True)