DI using constructor and added a unit test