Refactor integration test