Tests refactored