Diagnosing and Fixing JUnit 5 @TempDir Cleanup Issues
When JUnit 5 tests leave temporary directories behind, the problem can be traced to annotation placement, file locks, or parallel execution. This guide walks through diagnosing the issue, checking the test setup, and applying fixes that ensure clean‑up after each test.