Tests for Generated.generated? optimization