Refactor integration tests