Clean up the massive duplication in util_test.