Fix unit tests for generator