Effective ways to write automated tests in AI-generated codebases