Example on how to Unit Test RESTful Web Services using Spring Boot Test framework. It uses MockMvc to provide Spring MVC infrastructure without starting the HTTP Server. SpringRunner and @WebMvcTest provide rest of the environment for unit testing.
Refer RESTful Web Services Unit Testing with Spring Boot for detailed article.
- Spring Boot 1.4.1.RELEASE
- Spring Data JPA
- Database – PostgreSQL
- JDK 8