Refactored tests using fixtures for test data.