nerdexam
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)
  • A
    81% (25)
  • B
    3% (1)
  • C
    3% (1)
  • E
    13% (4)

Community Discussion

No community discussion yet for this question.

Full 2V0-72.22 Practice