Minor refactoring of model tests