Resolving tests using dependency injection