Test for $ctor injection

Code refactoring