A service has two own dependencies, its Contextand related Application. The structure ServiceTestCaseallows you to introduce these dependencies and thus run unit tests with controlled dependencies in an isolated environment.
Application , , , ServiceTestCase.setApplication().