Architecture Testing for Java with ArchUnit: Stop Trusting Your Diagram, Start Testing It

Your architecture diagram says controllers never touch the repository directly. Your codebase disagrees. It happens quietly. Someone is in a hurry, injects a CourseRepository straight into a controller to skip a service method, and the pull request gets approved because the tests pass and the change is small. The diagram in the wiki still shows a clean three-layer flow. The code no longer matc...