Looks like this is a useful helper that can go in a common test utility file.