Added the replaceDependencyInjectionObject method.