Fix a broken test.
Minor test code cleanup.