async def METHOD_NAME(self):
    async def mock_successful_index_documents(actions, timeout=86400):
        if len(actions) > 0:
            result = IndexingResult()
            result.key = actions[0].additional_properties.get("id")
            result.status_code = 200
            result.succeeded = True
            return [result]
    on_progress = mock.AsyncMock()
    on_remove = mock.AsyncMock()
    async with SearchIndexingBufferedSender(
        "endpoint", "index name", CREDENTIAL, auto_flush=False, on_progress=on_progress, on_remove=on_remove
    ) as client:
        client._index_documents_actions = mock_successful_index_documents
        client._index_key = "id"
        await client.upload_documents({"id": 0})
        await client.flush()
        assert on_progress.called
        assert on_remove.called