Added tests for dependency injection