Try to inject dependencies for tests.