async def METHOD_NAME(inputs, use_stream, mocker):
    r_val = mocker.Mock()
    with AsyncFlow(asyncio=True).add() as f:
        async for r in f.index(inputs, on_done=r_val, stream=use_stream):
            assert isinstance(r, DocumentArray)
    validate_callback(r_val, validate)