Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Many services have a responsibility to inform the application when
something has gone wrong—for example, that contact with the server has
been lost and data wasn’t able to be saved. If your service contains its
own data paths it can be difficult to test that it behaves correctly in
the face of an IOError, but if you inject your paths as
dependencies you can configure your test service with a bad url very
easily.
This example comes from a different application requiring a connection to a remote server in order to submit usage statistics: