Introduction
JUnit tests help check if your code works correctly. They catch mistakes early so you can fix them fast.
You want to check if a simple method returns the right result.
You want to make sure a bug you fixed does not come back.
You want to test small parts of your program before combining them.
You want to run tests automatically every time you change code.