As for unit testing there are a few nice tutorials on web to covert the topic for example for my favorite IDE – Writing JUnit Tests in NetBeans IDE. You can simply learn how to easily and quickly generate Test classes for your working classes. This is the very entrance to TDD. Another amazing thing is mocks, mocking which is something like “visualization” of objects needed for unit testing. For sure you will find there many more accurate definitions. I won’t be describing anything more about mocks and mockito which looks great and works fantastic. (the authors of this frameworks seems to be from PL but working in UK). I simply refer you to the amazing tutorial of using mockito. Mockito.LoginServiceExample which shows what it whole about testing and unit test for. How easily it is to write a new implementation for same interfaces and “refactoring” get completely new meaning. It is worth going through this tutorial for sure. (additionally you would learn about state design pattern and template design pattern from GoF patterns)