You’ve learned myriad ways of expressing expectations in this chapter by using JUnit’s Hamcrest assertions. Next up, you’ll take a look at how to best structure and organize your JUnit tests.

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.