Minor refactoring in test.