Changes the dependency injection strategy by using the new `Box` API.