Dependency injection exists for a reason. Without it our code would be almost impossible to test. However, there are some major drawbacks when using the most…