refactor integration test