Unit Testing in Java
Testing of code is required to know if your code is working as intended and see if unintended inputs will cause your program to crash completely. As you learn to code, you should also learn to test your code effectively.
Here are some free resources you can use to get started with unit testing your Java code.
As of this writing, the most recent version of Junit is Junit5. You can view the documentation of how to create great tests using JUnit5
Junit Testing in Action