Which of the below statements are valid for testing a REST controller class using Spring Boot testing? [Choose two]

Add @WebMvcTest and @SpringBootTest on top of the test class

Add only @WebMvcTest on top of the test class

Add only @SpringBootTest on top of the test class

Use @TestConfiguration to define MockMvc bean

Verified Answer
Correct Option - ae

To get all Infosys Certified Spring Boot Developer Exam questions Join Telegram Group https://rebrand.ly/lex-telegram-236dee

Telegram

We're passionate about offering best placement materials and courses!! A one stop place for Placement Materials. We daily post Offcampus updates and Placement Materials.

Qtr No. 213, New Town Yehlanka Indore 454775

admin@prepflix.in

Updated on Tue, 21 Oct 2025