These test functions are all identical, there's got to be a better way.