Refactor test.

Minor refactoring to make things a bit easier to read when generating
values for types.