Refactored Acceptance test code