Tests for generator