Minor refactoring of the tests