Testing with refactored code