Small refactoring.
Refactor test generators.