Refactored tests