After

In this chapter you got a whirlwind tour of TDD, which takes all the concepts you’ve learned about unit testing and puts them into a simple disciplined cycle: write a test, get it to pass, ensure the code is clean, and repeat. Adopting TDD may change the way you think about design.

When you return to your desk and start applying what you’ve learned about unit testing, you’ll inevitably hit a sticky challenge that makes you ask, “Now how am I gonna test that?” Let’s find out!

Get Pragmatic Unit Testing in Java 8 with JUnit now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.