By now, you should have a deep overview of Project Jigsaw and should be able to start using use it in your projects. But there’s one important topic we haven’t mentioned yet: unit testing. This chapter focuses on unit testing modular applications in Java 9 and the different approaches to it that you can take. In this chapter, we’ll show you some best practices for performing unit testing in Java 9 in the context of a modular application.
Suppose we have a module with classes that need to be tested. If we put the unit test classes in another module, then we need to make ...