Some test helper functions.
Merge pull request #4 from benjyw/helpers

Some test helper functions.