Which annotation is predominantly used in Spring Boot to write a JUnit test for a class?
- @Autowired
- @RunWith
- @SpringBootTest
- @Test
In Spring Boot, the @Test annotation is predominantly used to indicate that a method is a JUnit test method. It marks the method as a test to be run by the JUnit framework.
Loading...
Related Quiz
- In Spring Security, how can method security expressions be utilized to implement complex security constraints on service methods?
- To implement client-side load balancing in a Spring Cloud application, the _____ component can be used.
- Which of the following is the most efficient way to manage transactions in a Spring Boot application utilizing Spring Data JPA?
- In Spring Security, what is the significance of configuring a global method security, and how does it differ from standard method security configurations?
- For custom authentication logic in Spring Security, developers can create a bean of type _____.