As you develop your applications, you will find that the code you want to test depends on other classes, which themselves depend on other classes, which then depend on the environment (figure 7.1). You might be developing an application that uses Hibernate to access a database, a Java EE application (one that relies on a Java EE container for security, persistence, and other services), an application that accesses a filesystem, or an application that connects to some resource by using HTTP or another protocol.
Figure 7.1 The application depends on other classes, which in turn depend on other classes, which then depend on the environment.
