Simple example of using the REST Assured Response Interface (https://www.javadoc.io/doc/io.rest-assured/rest-assured/3.0.1/io/restassured/response/Response.html) to validate a payload.
It uses the reqres api: https://reqres.in/
To see it in action from the terminal run mvn test