Refactored test cases