More work on refactoring tests