refactor integration tests