Broadcom-VMware
2V0-72.22 · Question #90
Which two statements are true regarding @WebMvcTest? (Choose two.)
The correct answer is A. It auto-configures a MockMvc. D. Typically it is used in combination with @MockBean when there is a dependency bean to be. See the full explanation below for the reasoning.
Question
Which two statements are true regarding @WebMvcTest? (Choose two.)
Options
- AIt auto-configures a MockMvc.
- BIt will only scan for @Controller beans in the source code.
- CIt is used for testing Spring MVC components such as @Controller with a running server.
- DTypically it is used in combination with @MockBean when there is a dependency bean to be
- EIt is typically used with @ExtendWith(MockitoExtension.class) in JUnit 5.
How the community answered
(31 responses)- A81% (25)
- B3% (1)
- C3% (1)
- E13% (4)
Community Discussion
No community discussion yet for this question.