It doesn't matter how much time you put into design and how careful you are when programming; mistakes are inevitable. Without automated testing, it is time consuming and difficult to ensure that changes will not break existing code.
Sometimes, you need to simulate the underlying system in order to test it – in this case you might think of mocking, which is replacing subsystem objects with hardcoded objects to ease and simplify testing.
Fortunately, for Java programmers, JUnit makes such testing easy. JUnit makes it fast and easy to set up unit tests for your programs.
JUnit is a regression testing framework. It's an open source software used by the developer who implements unit tests in Java.
Mockito is another open source solution for mocking – so you have it all!
This course introduces testing in general and focuses on how to implement unit testing via JUnit and Mockito