Tests: refactored