Added check for annotation-based dependency injection in test.