Refactored test cases.