Added dependency injection to the TestClass