Minor refactoring of test cases.