Resolving proper injection of dependency