Introduction
The @AfterEach method runs after every test to clean up or reset things. It helps keep tests independent and tidy.
You want to close a database connection after each test.
You need to reset shared variables or states after every test.
You want to delete temporary files created during a test.
You want to clear mock objects or reset configurations after each test.