Summary
In this chapter, you learned why unit tests are such a valuable asset for Java developers. We've seen that well-written tests go beyond pure regression avoidance and experienced how they improve your code quality, increase your overall development pace, enhance your component specifications, and, last but not least, convey confidence and courage to your team members.
We've addressed the tool set that accompanies JUnit and prepared our workspace to be able to take active part in the following chapters. After the introduction of the ongoing example, which will serve us as the motivation and source for code snippets for the various subjects, we elaborated a definition of what unit testing is all about. Then, the time came to learn the very basics of writing and executing our first self-checking test. We concluded with an overview of the essentials of TDD, which prepared you for the following topics when you come to know more advanced unit testing techniques.
By continuously evolving our example, the next chapter will reveal the common structure of well-written unit tests. You'll learn some heuristics to pick the next behavior to implement and, finally, gain some insights into unit test naming conventions.