Add tests for CollectUntilIdle