refactoring integration test