Question: What is the purpose of the @ContextConfiguration annotation in a JUnit Test?

  1. It introspects the local machine and automatically provisions resources based on certain contextual configuration files.
  2. It automatically generates comments for annotated classes on autowired dependencies to provide additional context about dependencies.
  3. It defines metadata at the class-level to determine how to load or configure an ApplicationContext in Spring integration tests.
  4. It automatically generates JavaDocs for annotated classes to provide additional context about the purpose of the class.

Answer: The correct answer of the above question is Option C:It defines metadata at the class-level to determine how to load or configure an ApplicationContext in Spring integration tests.