Mockito

In this blog post you will learn the difference between @SpringBootTest and @WebMvcTest annotations. The main difference between @SpringBootTest and @WebMvcTest annotations is that @SpringBootTest annotation will start full application context. Whereas @WebMvcTest annotation will make Spring Framework create application context with a limited number of beans(only those related to Web Layer). You will use…

Read More Difference Between @SpringBootTest and @WebMvcTest

You will use @MockBean annotation to create and automatically add mocks to Spring ApplicationContext. In this tutorial, we will look at different ways you can use @MockBean annotation to create mocks. If you are testing your application with JUnit and Mockito, then there are many other useful tutorials you will find in the JUnit category of…

Read More @MockBean Annotation Example