refactored integration tests