Refactored test case.