Refactored integration test