def METHOD_NAME(app, mocker):
    "Tests valid batch of ursm update actions"
    set_patches(mocker)
    def get_events_side_effect(_, tx_receipt):
        return tx_receipts[tx_receipt["transactionHash"].decode("utf-8")]
    mocker.patch(
        "src.tasks.entity_manager.entity_manager.get_entity_manager_events_tx",
        side_effect=get_events_side_effect,
        autospec=True,
    )
    # setup db and mocked txs
    with app.app_context():
        db = get_db()
        web3 = Web3()
        challenge_event_bus: ChallengeEventBus = setup_challenge_bus()
        eth_manager = EthManager(None, None, None)
        update_task = UpdateTask(web3, challenge_event_bus, None, eth_manager)
    tx_receipts = {
        "UpdateUserReplicaSet1Tx": [
            {
                "args": AttributeDict(
                    {
                        "_entityId": 1,
                        "_entityType": "UserReplicaSet",
                        "_userId": 1,
                        "_action": "Update",
                        "_metadata": "1,2,3:2,3,4",
                        "_signer": "spid2",
                    }
                )
            },
        ],
    }
    entity_manager_txs = [
        AttributeDict({"transactionHash": update_task.web3.to_bytes(text=tx_receipt)})
        for tx_receipt in tx_receipts
    ]
    entities = {
        "users": [
            {
                "user_id": 1,
                "handle": "user-1",
                "wallet": "user1wallet",
                "primary_id": 1,
                "secondary_ids": [2, 3],
            }
        ]
    }
    populate_mock_db(db, entities)
    with db.scoped_session() as session:
        # index transactions
        entity_manager_update(
            update_task,
            session,
            entity_manager_txs,
            block_number=0,
            block_timestamp=1585336422,
            block_hash=hex(0),
        )
    with db.scoped_session() as session:
        # validate db records
        all_users: List[User] = session.query(User).all()
        assert len(all_users) == 1
        user_1: User = (
            session.query(User)
            .filter(User.is_current == True, User.user_id == 1)
            .first()
        )
        assert user_1.primary_id == 2
        assert user_1.secondary_ids == [3, 4]