Explain how you would structure unit tests and integration tests for a complex data preprocessing pipeline.