Refactoring test models