Merge "Add test to verify behavior of takeTaskSnapshot" into main