Add some helpers for common unit test patterns

Trivial patch, minor itch I've been wanting to scratch for a bit.