refactored test cases