Refactored tests for models