Broadcom-VMware
2V0-72.22 · Question #61
In a Spring test, which annotation can be used to mock a user?
The correct answer is B. @WithMockUser. See the full explanation below for the reasoning.
Question
In a Spring test, which annotation can be used to mock a user?
Options
- A@MockAuthentication
- B@WithMockUser
- C@Mock
- D@MockBean
How the community answered
(58 responses)- A5% (3)
- B84% (49)
- C9% (5)
- D2% (1)
Community Discussion
No community discussion yet for this question.