Tests for generators and Type&Donate refactoring