Introduction
assertEquals checks if two values are the same. It helps confirm your code works as expected.
When you want to check if a method returns the correct number.
When you want to verify that two strings are exactly equal.
When you want to compare expected and actual results in a test.
When you want to confirm that a calculation gives the right answer.