© Balaji Varanasi and Maxim Bartkov 2022
B. Varanasi, M. BartkovSpring RESThttps://doi.org/10.1007/978-1-4842-7477-4_9

9. Clients and Testing

Balaji Varanasi1   and Maxim Bartkov2
(1)
Salt Lake City, UT, USA
(2)
Kharkov, Ukraine
 
In this chapter we will discuss the following:
  • Building clients using RestTemplate

  • Spring Test framework basics

  • Unit testing MVC controllers

  • Integration testing MVC controllers

We have looked at building REST services using Spring. In this chapter, we will look at building clients that consume these REST services. We will also examine the Spring Test framework that can be used to perform unit and end-to-end testing of REST services.

QuickPoll Java Client

Consuming REST services involves building a JSON or XML request payload, transmitting ...

Get Spring REST: Building Java Microservices and Cloud Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.