Add test to ensure AutoContext adds tasks to queue

Also ensure they are added correctly in batches.