refactoring integration tests