Added dependency injection tests