It seems kind weird to include this function in the middle of a lot of other test-related code.