Test for constructor injection