Broadcom-VMware
2V0-72.22 · Question #75
Refer to the exhibit. What statement is true about @DirtiesContext?
The correct answer is B. It will close the existing cached ApplicationContext and recreate a new one after the test method. See the full explanation below for the reasoning.
Question
Refer to the exhibit. What statement is true about @DirtiesContext?
Exhibit
Options
- AIt will close the existing cached ApplicationContext and recreate a new one before the test method.
- BIt will close the existing cached ApplicationContext and recreate a new one after the test method.
- CIt will keep the existing cached ApplicationContext, all changes to Spring managed beans will be
- DIt will recreate only the Spring managed beans that are modified inside the test method.
How the community answered
(20 responses)- A5% (1)
- B70% (14)
- C5% (1)
- D20% (4)
Community Discussion
No community discussion yet for this question.
