Minor refactoring of unit test.