Minor refactoring of test.