Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam 2V0-72.22 All Questions

View all questions & answers for the 2V0-72.22 exam

Exam 2V0-72.22 topic 1 question 65 discussion

Actual exam question from VMware's 2V0-72.22
Question #: 65
Topic #: 1
[All 2V0-72.22 Questions]

Refer to the exhibit.



What statement is true about @DirtiesContext?

  • A. It will close the existing cached ApplicationContext and recreate a new one before the test method.
  • B. It will close the existing cached ApplicationContext and recreate a new one after the test method.
  • C. It will keep the existing cached ApplicationContext, all changes to Spring managed beans will be reverted after the test.
  • D. It will recreate only the Spring managed beans that are modified inside the test method.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Uteman
1 month, 3 weeks ago
B is correct @DirtiesContext @Test void testProcessWhichDirtiesAppCtx() { // some logic that results in the Spring container being dirtied } Dirty the context after the current test method. https://docs.spring.io/spring-framework/reference/testing/annotations/integration-spring/annotation-dirtiescontext.html
upvoted 1 times
...
2211094
4 months, 3 weeks ago
A is the correct answer. Here is reference: https://docs.spring.io/spring-framework/reference/testing/annotations/integration-spring/annotation-dirtiescontext.html
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...