Added unit tests for dependency injection