def METHOD_NAME(migration, plan_name):
    mock_shard_allocation = _get_expected_yml(plan_name, 'mock_shard_allocation_pre_migration.yml')
    mock_func = get_shard_allocation_func(mock_shard_allocation)
    db_info = [
        (allocation['_id'], 10, {'a': 10}, sorted(allocation['by_range']), ShardAllocationDoc.wrap(allocation))
        for allocation in mock_shard_allocation
    ]
    with patch('couchdb_cluster_admin.suggest_shard_allocation.get_db_info', return_value=db_info):
        generate_shard_plan(migration)
    with patch('couchdb_cluster_admin.file_plan.get_shard_allocation', mock_func):
        migration_file_configs = get_migration_file_configs(migration)
        generate_rsync_lists(migration, migration_file_configs)
    return migration_file_configs