Refactor integration spec