Refactor model tests