Refactor and reduce integration test