The _____ utility in Spring Boot is used to perform HTTP requests and assert the response within tests when you want to focus only on the web layer.
- @Autowired
- @RestController
- @Service
- TestRestTemplate
The TestRestTemplate utility in Spring Boot is used to perform HTTP requests and assert the response within tests. It is especially useful when you want to focus on testing the web layer and interact with your RESTful endpoints.
Loading...
Related Quiz
- In a Spring Boot project, which file is primarily used to declare project dependencies?
- How can parameterized tests be created using JUnit?
- To enable global method security in Spring Security, the _____ attribute should be set to true in the @EnableGlobalMethodSecurity annotation.
- How can you handle exceptions globally across multiple controllers in a Spring Boot application?
- In Spring Boot, the properties defined in the _____ file are used to configure the application.