Refactor checkout test case