Refactor acceptance test