Chapter 3. Developing Independently Testable Units
One of the most difficult parts for JUnit beginners confronted with non-trivial real-world situations is to decompose big requirements into small and independently testable units. At the beginning of this chapter, you're going to learn how requirements can be translated into single responsibility components and how they assemble into a collaborating system.
Next you're going to understand the impact of collaboration dependencies on our testing efforts. Once you're aware of the role of collaborators and how a component under test interacts with them, you'll get to know when it is important to replace them with test doubles.
Continuing our timeline example, we'll look at the use cases and application practices of the various double patterns in depth. After that, you'll learn about the advantages and disadvantages of mock frameworks. You'll also see how to work with generated doubles in practice,...