In this tutorial i show you how to unit test Java REST web service HTTP requests via a mock Spring RestTemplate utilising Spring MockRestServiceServer.
Tutorial on how to mock your Java REST Client with Spring.
Creating automated unit tests for your RestTemplate requests will add value by asserting the HTTP requests contain all expected values (HTTP Headers, payload, etc).
If you enjoyed the video, please share, comment & subscribe for more great content!
Enjoy!
Philip
How to consume a RESTFul API with Spring RestTemplate: • Consume a RESTful Web Service in Java Spri...
Spring MockRestServiceServer: http://docs.spring.io/spring/docs/cur...
Spring RestTemplate: http://docs.spring.io/spring/docs/cur...
Java Hamcrest: http://hamcrest.org/JavaHamcrest/